PHP manual has a page "Zend API" in "PHP at the Core" section. There C
structures, used to call PHP functions (internally) are described (they are not
called as from PHP, e.g. they all have aditional arguments, and you get result
in one of them). You can look exported function names in some DLL-info tool. In
C sources mostly used functions are in "ext/standard" folder. After figuring
out the function's C-interface (how it's to be called), translate it to Nim (as
examples procs in Nim's standard library with `{.exportc: ... .}`). After
loading the PHP's DLL, you may need some initialization step.
Probably it's simpler to find in net examples for calling from C, and translate
it to Nim.