Embeder uses the phpembed SAPI from PHP inorder to embed a version of PHP into itself.
From there is uses win32std to access a PHP file and run it from it's internal res.
Currently, there is one major limitation: It does not embed PHP completely, rather it ouputs PHP into a DLL, as of now called php7ts.dll
This is the same for extensions, shared ones must be loaded via php.ini
See appveyor...
Extensions are compiled statically - See release notes for extensions
Additional extensions included:
- Winbinder
- Win32ps
- FreeImage - Use with Winbinder or FFI
By default, the embedded bootstrap include remains:
include 'res:///PHP/LIB';
You can override the include target through PHP INI with:
embeder.bootstrap=/path/to/bootstrap.php
embeder.bootstrap defaults to an empty value, so if it is unset/empty the embedder falls back to res:///PHP/LIB.
Exit-code behavior is deterministic:
- If
zend_eval_string(...)fails, the process exits with failure (EXIT_FAILURE). - If the eval result is an integer/long, that value is returned (clamped to the platform
intrange). - If the eval result is not an integer, it is converted safely to a long and then clamped to
intbefore returning. - If no usable eval value is available, the process exits with failure (
EXIT_FAILURE).
- Eric Colinet - For the original concept & code!
- Jared Allard - Mantaining the project, improving the features, and more!
- See: http://wildphp.free.fr/wiki/doku.php?id=win32std:embeder