### Configure Build with CMake Source: https://context7.com/asgrim/example-pie-extension/llms.txt Example configuration for using CMake to manage the build process, facilitating IDE integration and cross-platform support. ```cmake cmake_minimum_required(VERSION 3.10) project(example_pie_extension) find_path(PHP_INCLUDE_DIR NAMES php.h PATHS /usr/include/php) ``` -------------------------------- ### Install Extension via Composer Source: https://context7.com/asgrim/example-pie-extension/llms.txt Uses the PIE package type to automatically fetch, compile, and install the extension into the PHP environment. ```bash composer require asgrim/example-pie-extension ``` -------------------------------- ### Build Extension on Linux Source: https://context7.com/asgrim/example-pie-extension/llms.txt Manual compilation process using phpize and configure scripts to enable the extension and set custom build-time options. ```bash phpize ./configure --enable-example-pie-extension --with-hello-name="Developer" make make test sudo make install ``` -------------------------------- ### Invoke Extension Function in PHP Source: https://context7.com/asgrim/example-pie-extension/llms.txt Demonstrates how to verify if the extension is loaded and execute the provided test function. The output depends on compile-time configuration parameters. ```php if (extension_loaded('example_pie_extension')) { example_pie_extension_test(); } $isLoaded = extension_loaded('example_pie_extension'); var_dump($isLoaded); phpinfo(INFO_MODULES); ``` -------------------------------- ### Build Extension on Windows Source: https://context7.com/asgrim/example-pie-extension/llms.txt Compilation process for Windows environments using the PHP SDK and nmake, requiring the appropriate Visual Studio development command prompt. ```batch phpize configure --enable-example-pie-extension --enable-debug nmake nmake run ARGS="-m" ``` -------------------------------- ### Build Extension Library (CMake) Source: https://context7.com/asgrim/example-pie-extension/llms.txt Defines a shared library for the PHP extension using CMake. It specifies the source file and includes necessary PHP header directories for compilation. ```cmake add_library(example_pie_extension SHARED zend_example_pie_extension.c ) target_include_directories(example_pie_extension PRIVATE ${PHP_INCLUDE_DIR} ${PHP_INCLUDE_DIR}/main ${PHP_INCLUDE_DIR}/TSRM ${PHP_INCLUDE_DIR}/Zend ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.