This project can build PHP files to be used to generate fake PHP files containing the definitions of constants, interfaces, classes, traits and functions provided by PHP extensions.
The bin/extract
command will generate or update an XML file that contains the definition of the PHP code.
You can run it multiple times against the same XML file, using different environment (for instance, adding a new PHP extension, running it under a different OS like Windows or POSIX, ...).
Use the --help
option to get help.
The extract
command can also be executed inside a Docker image. To do that, simply call bin/extract-docker
.
Use the --help
option to get help.
The bin/generate
command will actually generate the fake PHP files, reading the XML files generated by bin/extract
.
Use the --help
option to get help.
# Generate the XML data files
./bin/extract
# Generate the XML data files using the 7.2 Docker image
./bin/extract-docker 7.2
# Generate the PHP fake files
./bin/generate
Simply replace forward slashes(/
) with the backward slashes(\
) 😉