### Install PEAR Component for PHP Source: https://github.com/php/php-src/blob/master/pear/install-pear.txt Use this command to install the PEAR component if it was not installed during the initial PHP setup. Ensure you have downloaded the necessary PHAR file to the correct directory. ```bash # make install-pear ``` -------------------------------- ### Install PHP from Source Source: https://github.com/php/php-src/blob/master/README.md Installs the compiled PHP binaries and files to their designated locations. Superuser permissions might be required depending on the installation prefix and system configuration. ```shell make install ``` -------------------------------- ### Compiling the Basic Embed SAPI Example Source: https://github.com/php/php-src/blob/master/sapi/embed/README.md Command to compile the C example, linking against the PHP shared library and setting runtime library paths. ```bash $ cc \ $(php-config --includes) \ -L$(php-config --prefix)/lib \ embed_sapi_basic_example.c \ -lphp \ -Wl,-rpath,$(php-config --prefix)/lib ``` -------------------------------- ### Vagrantfile for LDAP Setup Source: https://github.com/php/php-src/blob/master/ext/ldap/tests/README.md This Vagrantfile sets up a virtual machine with OpenLDAP pre-installed and configured. It updates packages, installs slapd and ldap-utils, generates an LDAP password, and modifies the OpenLDAP configuration for a test environment. ```ruby $setup = << ``` -------------------------------- ### PHP NEWS File Entry Example Source: https://github.com/php/php-src/blob/master/CONTRIBUTING.md An example demonstrating the required format for entries in the NEWS file. It shows how to list changes for different extensions, including bug fixes with GH issue numbers. ```text 06 Jun 2024, PHP 8.1.29 - Core: . Added PHP_BUILD_PROVIDER constant. (timwolla) . Fixed bug GH-16665 (\array and \callable should not be usable in class_alias). (nielsdos) . Fixed bug GH-19326 (Calling Generator::throw() on a running generator with a non-Generator delegate crashes). (Arnaud) - OPcache: . Make OPcache non-optional. (Arnaud, timwolla) - OpenSSL: . Add $digest_algo parameter to openssl_public_encrypt() and openssl_private_decrypt() functions. (Jakub Zelenka) ``` -------------------------------- ### PHP Test Example with DONE and Exit Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md This example demonstrates how to terminate the --FILE-- section with '===DONE===' and an exit call to allow running test scripts directly from the command line. `run-tests.php` ignores content after '===DONE==='. ```php --TEST-- Test hypot() — dealing with mixed number/character input --INI-- precision=14 --FILE-- ===DONE=== --EXPECTF-- 23abc :-33 float(40.224370722238) ===DONE=== ``` -------------------------------- ### Start lsphp Manually with a Socket Address Source: https://github.com/php/php-src/blob/master/sapi/litespeed/README.md Use the `-b ` option to manually start `lsphp` and bind it to a specified socket address. This is useful in clustered environments. ```bash ./lsphp -b [::]:3000 ``` ```bash ./lsphp -b *:3000 ``` ```bash ./lsphp -b 192.168.0.2:3000 ``` ```bash ./lsphp -b /tmp/lsphp_manual.sock ``` -------------------------------- ### PHP Tokenization Example Source: https://github.com/php/php-src/blob/master/docs/source/introduction/high-level-overview.md A simple PHP code snippet demonstrating basic control flow and output. ```php if ($cond) { echo "Cond is true\n"; } ``` -------------------------------- ### Install and Use compiledb for compile_commands.json Source: https://github.com/php/php-src/blob/master/docs/source/introduction/ides/visual-studio-code.md Install the compiledb tool using pip and then prefix your make command to compile the project and generate the `compile_commands.json` file. This file is crucial for IDEs to understand include paths and compiler flags. ```bash # Install compiledb pip install compiledb # Compile php-src and generate compile_commands.json compiledb make -j8 ``` -------------------------------- ### Basic Embed SAPI Initialization in C Source: https://github.com/php/php-src/blob/master/sapi/embed/README.md Boots the Zend Engine, starts a request, and counts loaded functions. Ensure PHP is built with the embed SAPI enabled. ```c /* embed_sapi_basic_example.c */ #include int main(int argc, char **argv) { /* Invokes the Zend Engine initialization phase: SAPI (SINIT), modules * (MINIT), and request (RINIT). It also opens a 'zend_try' block to catch * a zend_bailout(). */ PHP_EMBED_START_BLOCK(argc, argv) php_printf( "Number of functions loaded: %d\n", zend_hash_num_elements(EG(function_table)) ); /* Close the 'zend_try' block and invoke the shutdown phase: request * (RSHUTDOWN), modules (MSHUTDOWN), and SAPI (SSHUTDOWN). */ PHP_EMBED_END_BLOCK() } ``` -------------------------------- ### Install Build Dependencies on Fedora Source: https://github.com/php/php-src/blob/master/README.md Installs required packages for compiling PHP on Fedora. Requires `sudo` or root access. ```shell sudo dnf install re2c bison autoconf make ccache libxml2-devel sqlite-devel ``` -------------------------------- ### Install Build Dependencies on MacOS with MacPorts Source: https://github.com/php/php-src/blob/master/README.md Installs necessary build tools for PHP on macOS using MacPorts. ```shell sudo port install autoconf bison re2c libiconv libxml2 sqlite3 ``` -------------------------------- ### Example Opcodes for AST Source: https://github.com/php/php-src/blob/master/docs/source/introduction/high-level-overview.md These are example opcodes generated from an Abstract Syntax Tree (AST). They represent the virtual machine instructions that PHP executes. ```text 0000 JMPZ CV0($cond) 0002 0001 ECHO string("Cond is true\n") 0002 RETURN int(1) ``` -------------------------------- ### Get Help for Test Runner Options Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/running-tests.md Display a list of all available options for the test runner script. This is done by passing -h to the TESTS= argument. ```shell make test TESTS=-h ``` -------------------------------- ### PHP Abstract Syntax Tree (AST) Example Source: https://github.com/php/php-src/blob/master/docs/source/introduction/high-level-overview.md A simplified representation of an Abstract Syntax Tree (AST) generated from PHP tokens, illustrating the hierarchical structure of the code. ```text ZEND_AST_IF { ZEND_AST_IF_ELEM { ZEND_AST_VAR { ZEND_AST_ZVAL { "cond" }, }, ZEND_AST_STMT_LIST { ZEND_AST_ECHO { ZEND_AST_ZVAL { "Cond is true\n" }, }, }, }, } ``` -------------------------------- ### PHPT --DESCRIPTION-- Section Example Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md The --DESCRIPTION-- section provides additional details about the test case. It is optional and can span multiple lines, but is ignored by the test binary. ```text --DESCRIPTION-- This test covers both valid and invalid usages of filter_input() with INPUT_GET and INPUT_POST data and several different filter sanitizers. ``` -------------------------------- ### Including Stub Files for Constants Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/stubs.md This example demonstrates how to include a stub file that defines constants, making them available for use in other stub files. This is necessary when constants are not defined in the same file. ```php // constants.stub.php > ``` -------------------------------- ### Good Method Names Source: https://github.com/php/php-src/blob/master/CODING_STANDARDS.md Method names should follow the StudlyCaps convention, starting with a lowercase letter and capitalizing subsequent words. ```php connect() ``` ```php getData() ``` ```php buildSomeWidget() ``` ```php performHttpRequest() ``` -------------------------------- ### Run SQL Server Docker Container Source: https://github.com/php/php-src/blob/master/ext/pdo_dblib/tests/README.md Starts a Microsoft SQL Server 2019 instance in a Docker container. Ensure you replace '' with a secure password. ```bash docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=" -p 1433:1433 --name sql1 -h sql1 -d mcr.microsoft.com/mssql:2019-latest ``` -------------------------------- ### Calling PHP Functions from C using Embed SAPI Source: https://github.com/php/php-src/blob/master/sapi/embed/README.md Example demonstrating how to call PHP functions like `mt_rand()` and `var_dump()` from C code using the embed SAPI. ```c #include
#include #include int main(int argc, char **argv) { PHP_EMBED_START_BLOCK(argc, argv) zval retval = {0}; zend_fcall_info fci = {0}; zend_fcall_info_cache fci_cache = {0}; zend_string *func_name = zend_string_init(ZEND_STRL("mt_rand"), 0); ZVAL_STR(&fci.function_name, func_name); fci.size = sizeof fci; fci.retval = &retval; if (zend_call_function(&fci, &fci_cache) == SUCCESS) { php_var_dump(&retval, 1); } zend_string_release(func_name); PHP_EMBED_END_BLOCK() } ``` -------------------------------- ### PHP Intl Function Example with Error Handling Source: https://github.com/php/php-src/blob/master/ext/intl/ERROR_CONVENTIONS.md Demonstrates argument parsing and error setting within a PHP internal function. Macros like `BREAKITER_METHOD_INIT_VARS` and `BREAKITER_METHOD_FETCH_OBJECT` handle error resetting. ```c U_CFUNC PHP_FUNCTION(breakiter_set_text) { /* ... variable declarations ... */ BREAKITER_METHOD_INIT_VARS; /* macro also resets global error */ object = getThis(); if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &text, &text_len) == FAILURE) { intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "breakiter_set_text: bad arguments", 0); RETURN_THROWS(); } /* ... */ BREAKITER_METHOD_FETCH_OBJECT; /* macro also resets object's error */ /* ... */ } ``` -------------------------------- ### PHPT --CREDITS-- Section Example (Single Author) Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md The --CREDITS-- section is used to credit contributors. For new tests, Git commit messages are preferred for tracking authorship. ```text --CREDITS-- Felipe Pena ``` -------------------------------- ### Filter Input Data with filter_input() Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Tests the filter_input() function with various sanitization and validation filters for GET and POST data. Includes examples of invalid usage and expected warnings. ```php ``` -------------------------------- ### Build php-src Documentation Source: https://github.com/php/php-src/blob/master/docs/README.md Steps to build the documentation locally. Requires Python 3 and pip. It's recommended to use a virtual environment. ```bash cd docs # Recommended: Initialize and activate a Python virtual environment pip install --upgrade pip pip install -r requirements.txt make html ``` -------------------------------- ### GET Variables for PHP Test Scripts Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Pass GET variables to the test script. This forces the use of the CGI binary. The format is a single line of text passed as GET data. ```text --GET-- a=test&b=http://example.com ``` ```text --GET-- ar[elm1]=1234&ar[elm2]=0660&a=0234 ``` -------------------------------- ### Run Test Suite on Windows Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/running-tests.md On Windows systems, the 'make' command is replaced by 'nmake'. Use 'nmake test' to execute the test suite. ```shell nmake test ``` -------------------------------- ### Install Build Dependencies on MacOS with Homebrew Source: https://github.com/php/php-src/blob/master/README.md Installs essential tools for building PHP on macOS using the Homebrew package manager. ```shell brew install autoconf bison re2c libiconv libxml2 sqlite ``` -------------------------------- ### Git Commit Message Example: pack-objects Source: https://github.com/php/php-src/blob/master/CONTRIBUTING.md An example commit message for 'pack-objects' showing a short description and a detailed explanation of the change. ```git pack-objects: Fix compilation with NO_PTHREDS\n\nIt looks like commit 99fb6e04 (pack-objects: convert to use parse_options(),\n 2012-02-01) moved the #ifdef NO_PTHREDS around but hasn\'t noticed that the\n \'arg\' variable no longer is available. ``` -------------------------------- ### Running PHP SNMP Test Suite Source: https://github.com/php/php-src/blob/master/ext/snmp/tests/README.md Execute the test suite using `make` command. This command dynamically lists all `.phpt` files in the `ext/snmp/tests/` directory and passes them to the test runner. ```bash make -C ../../.. test TESTS="`cd ../../..; /bin/ls -1 ext/snmp/tests/*.phpt | xargs echo`" ``` -------------------------------- ### Prepare Release Build Message Source: https://github.com/php/php-src/blob/master/docs/release-process.md Format a message to the `release-managers@php.net` distribution list indicating that a release is ready for Windows binary builds. Include the tag, tarball location, and manifest URL. ```text Subject: PHP 8.1.6RC1 ready for builds Hi, all! Tag: php-8.1.6RC1 Tarballs: https://downloads.php.net/~ramsey/ Manifest: https://gist.github.com/ramsey/5d73f0717effb6d8d17699381361e4b1 Cheers, Ben << PASTE FULL MANIFEST CONTENTS HERE >> ``` -------------------------------- ### Commit Message Examples for Bug Fixes Source: https://github.com/php/php-src/blob/master/README.md Examples of commit messages referencing GitHub issues (GH-NNNNNN) or the old bug tracker (#NNNNNN) for bug fixes. ```text Fix GH-7815: php_uname doesn't recognise latest Windows versions Fix #55371: get_magic_quotes_gpc() throws deprecation warning ``` -------------------------------- ### Generate Method Synopses Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/stubs.md Use this option to create documentation pages for functions or methods that are not yet documented. Specify the directory containing the stubs and the target directory for the generated documentation. ```shell ./build/gen_stub.php --generate-methodsynopses ./ext/mbstring ../doc-en/reference/mbstring ``` -------------------------------- ### Parse Command-Line Arguments with getopt Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Demonstrates the usage of getopt for parsing short and long command-line options, including those requiring values. Ensure register_argc_argv is enabled in php.ini. ```php ``` -------------------------------- ### Bad User Function Names Source: https://github.com/php/php-src/blob/master/CODING_STANDARDS.md Avoid overly abbreviated or unclear function names. These examples are difficult to understand. ```php hw_GetObjectByQueryCollObj ``` ```php pg_setclientencoding ``` ```php jf_n_s_i ``` -------------------------------- ### Create Release Entry Source: https://github.com/php/php-src/blob/master/docs/release-process.md Use this command to create a new release entry in the web-php repository. Include the `--security` flag if the release addresses security vulnerabilities. ```bash php bin/createReleaseEntry -v [ --security ] ``` -------------------------------- ### Run Opcache JIT Tests Source: https://github.com/php/php-src/blob/master/ext/opcache/jit/README.md Command to run Opcache JIT tests with specific configurations. Use `--repeat 2` to catch bugs that appear after multiple requests. ```bash make test TESTS="-d opcache.jit_buffer_size=16M -d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.protect_memory=1 -d opcache.jit=tracing --repeat 2 --show-diff -j$(nproc) ext/opcache Zend" ``` -------------------------------- ### PHP Tokenization Output Example Source: https://github.com/php/php-src/blob/master/docs/source/introduction/high-level-overview.md The tokenized representation of the PHP code snippet, showing token types and their corresponding lexemes. ```text T_IF "if" T_WHITESPACE " " "(" T_VARIABLE "$cond" ")" T_WHITESPACE " " "{" T_WHITESPACE "\n " T_ECHO "echo" T_WHITESPACE " " T_CONSTANT_ENCAPSED_STRING '"Cond is true\n"' ";" T_WHITESPACE "\n" "} ``` -------------------------------- ### Create Test Database Source: https://github.com/php/php-src/blob/master/ext/mysqli/tests/README.md Run this SQL command in the MySQL client to create the 'test' database required for the mysqli extension tests. ```sql CREATE DATABASE test; ``` -------------------------------- ### imap_append() Basic Functionality Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Tests the basic functionality of the imap_append() function to append messages to a mailbox. Requires a setup and cleanup script. ```php --TEST-- Test imap_append() function : basic functionality --SKIPIF-- --FILE-- Mailbox . "\n"; var_dump(imap_append($imap_stream, $mb_details->Mailbox , "From: webmaster@something.com\r\n" . "To: info@something.com\r\n" . "Subject: Test message\r\n" . "\r\n" . "this is a test message, please ignore\r\n" )); var_dump(imap_append($imap_stream, $mb_details->Mailbox , "From: webmaster@something.com\r\n" . "To: info@something.com\r\n" . "Subject: Another test\r\n" . "\r\n" . "this is another test message, please ignore it too!!\r\n" )); $check = imap_check($imap_stream); echo "Msg Count after append : ". $check->Nmsgs . "\n"; echo "List the msg headers\n"; var_dump(imap_headers($imap_stream)); imap_close($imap_stream); ?> --CLEAN-- --EXPECTF-- *** Testing imap_append() : basic functionality *** Create a new mailbox for test Create a temporary mailbox and add 0 msgs .. mailbox '%s' created Add a couple of msgs to new mailbox {%s}INBOX.%s bool(true) bool(true) Msg Count after append : 2 List the msg headers array(2) { [0]=> string(%d) "%w%s 1)%s webmaster@something. Test message (%d chars)" [1]=> string(%d) "%w%s 2)%s webmaster@something. Another test (%d chars)" } ``` -------------------------------- ### Get GPG Fingerprint Source: https://github.com/php/php-src/blob/master/docs/release-process.md Use this command to retrieve the GPG fingerprint for your email address. This is required when updating GPG keys in the web-php repository. ```console ❯ gpg --fingerprint ramsey@php.net pub rsa4096 2021-04-26 [SC] [expires: 2025-11-24] 39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544 uid [ultimate] Ben Ramsey sub rsa4096 2021-04-26 [E] [expires: 2025-11-24] ``` -------------------------------- ### Calendar Object Structure with Intl Error Source: https://github.com/php/php-src/blob/master/ext/intl/ERROR_CONVENTIONS.md Example of an object structure that includes an `intl_error` field for storing error information specific to the object. ```c typedef struct { zend_object zo; intl_error err; Calendar* ucal; } Calendar_object; ``` -------------------------------- ### Send GPG Key to Keyservers Source: https://github.com/php/php-src/blob/master/docs/release-process.md After creating and signing your GPG key, use these commands to publish your public key to public keyservers. Replace YOURKEYID with your actual GPG key ID. ```shell gpg --keyserver keys.openpgp.org --send-keys YOURKEYID gpg --keyserver keyserver.ubuntu.com --send-keys YOURKEYID ``` -------------------------------- ### PHP Script for Embed SAPI Execution Source: https://github.com/php/php-src/blob/master/sapi/embed/README.md A simple PHP script that outputs a greeting. This script is intended to be executed by the C embed SAPI example. ```php " -Q "create login pdo_test with password='password', check_policy=off; create user pdo_test for login pdo_test; grant alter, control to pdo_test;" ``` -------------------------------- ### DOMDocument::save Basic Functionality Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Tests the basic functionality of the DOMDocument::save method to save an XML document to a file. Includes setup and cleanup. ```php --TEST-- DOMDocument::save Test basic function of save method --SKIPIF-- --FILE-- formatOutput = true; $root = $doc->createElement('book'); $root = $doc->appendChild($root); $title = $doc->createElement('title'); $title = $root->appendChild($title); $text = $doc->createTextNode('This is the title'); $text = $title->appendChild($text); $temp_filename = __DIR__.'/DomDocument_save_basic.tmp'; echo 'Wrote: ' . $doc->save($temp_filename) . ' bytes'; // Wrote: 72 bytes ?> --CLEAN-- --EXPECTF-- Wrote: 72 bytes ``` -------------------------------- ### Access GET Variables with CGI Binary Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Demonstrates how PHP's $_GET superglobal array populates when using CGI binary input with URL-encoded parameters. ```php ``` -------------------------------- ### Create News Entry for Pre-GA Releases Source: https://github.com/php/php-src/blob/master/docs/release-process.md Use the `bin/createNewsEntry` tool within the `web-php` repository to generate an XML news entry for pre-GA releases. Select the 'frontpage' category and provide the announcement text. ```shell cd /path/to/repos/php/web-php ./bin/createNewsEntry # Please type in the title: PHP X.Y.0 Alpha n available for testing # Categories: # 0: PHP.net frontpage news [frontpage] # 1: New PHP release [releases] # 2: Conference announcement [conferences] # 3: Call for Papers [cfp] # Please select appropriate categories, separated with space: 0 # Will a picture be accompanying this entry? no # And at last; paste/write your news item here. # To end it, hit . # # [[ Here you will paste the full HTML of the post. ]] # . # git add -p git add archive/entries/*.xml git commit --gpg-sign=YOURKEYID -m "Announce PHP X.Y.0RCn" git push upstream master ``` -------------------------------- ### Apply Lexbor Patches Source: https://github.com/php/php-src/blob/master/ext/lexbor/patches/README.md Apply the Lexbor patches sequentially using `git am`. Ensure you are in the `ext/lexbor/lexbor` directory before applying. ```bash git am -3 ../patches/0001-Expose-line-and-column-information-for-use-in-PHP.patch ``` ```bash git am -3 ../patches/0002-Track-implied-added-nodes-for-options-use-in-PHP.patch ``` ```bash git am -3 ../patches/0003-Patch-utilities-and-data-structure-to-be-able-to-gen.patch ``` ```bash git am -3 ../patches/0004-Remove-unused-upper-case-tag-static-data.patch ``` ```bash git am -3 ../patches/0005-Shrink-size-of-static-binary-search-tree.patch ``` ```bash git am -3 ../patches/0006-Patch-out-unused-CSS-style-code.patch ``` -------------------------------- ### Filter Input with Validation and Flags Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Demonstrates using filter_input with different validation types and flags for GET parameters. Note the handling of octal values and array requirements. ```php FILTER_FLAG_ALLOW_OCTAL)); var_dump($ret); $ret = filter_input(INPUT_GET, 'ar', FILTER_VALIDATE_INT, array('flags'=>FILTER_REQUIRE_ARRAY)); var_dump($ret); $ret = filter_input(INPUT_GET, 'ar', FILTER_VALIDATE_INT, array('flags'=>FILTER_FLAG_ALLOW_OCTAL|FILTER_REQUIRE_ARRAY)); var_dump($ret); ?> ``` -------------------------------- ### Commit Message Example: Bug Fix with GH ID Source: https://github.com/php/php-src/blob/master/CONTRIBUTING.md When fixing bugs, include the bug ID number (e.g., GH-14009) in the commit message for easy tracking. ```git Fixed GH-14009: Fix prototype for trait method. ``` -------------------------------- ### SOAP Server with Deflate Compressed Request Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/writing-tests.md Sets up a SOAP server that handles requests compressed with deflate. Requires the zlib extension. ```php --TEST-- SOAP Server 20: compressed request (deflate) --SKIPIF-- --INI-- precision=14 --DEFLATE_POST-- --FILE-- "http://testuri.org")); $server->addfunction("test"); $server->handle(); echo "ok\n"; ?> --EXPECT-- Hello World ok ``` -------------------------------- ### Basic zend_string Usage Source: https://github.com/php/php-src/blob/master/docs/source/core/data-structures/zend_string.md Demonstrates how to initialize a zend_string from a literal, write its content, and release its memory. Ensure to release strings to prevent memory leaks. ```c // Allocate the string. zend_string *string = ZSTR_INIT_LITERAL("Hello world!", /* persistent */ false); // Write it to the output buffer. zend_write(ZSTR_VAL(string), ZSTR_LEN(string)); // Decrease the reference count and free it if necessary. zend_string_release(string); ``` -------------------------------- ### Execute PDO MySQL Extension Tests Source: https://github.com/php/php-src/blob/master/ext/pdo_dblib/tests/README.md Runs the pdo_dblib extension tests after setting up the SQL Server environment. Configure the DSN, username, and password using environment variables before running 'make test'. ```bash PDO_DBLIB_TEST_DSN="dblib:host=127.0.0.1;dbname=master;version=7.0" PDO_DBLIB_TEST_USER="pdo_test" PDO_DBLIB_TEST_PASS="password" TESTS=ext/pdo_dblib make test ``` -------------------------------- ### Registering Generated Function Entries in C Source: https://github.com/php/php-src/blob/master/docs/source/miscellaneous/stubs.md Demonstrates how to pass the generated `ext_functions` and `class_Atmosphere_methods` arrays to the `zend_module_entry` struct and `INIT_CLASS_ENTRY` macro for module and class registration, respectively. ```c INIT_CLASS_ENTRY(ce, "Atmosphere", class_Atmosphere_methods); ```