I want to run PHP functions in the nim language. For example, the date function.
On a Windows machine, PHP has many dlls, but is it possible to call PHP dlls and use functions in the nim language?
I would appreciate it if you could let me know if anyone knows. Thank you.
You can, as long as those PHP dlls are generated from C or compatible with C, see https://nim-lang.org/docs/backends.html#interfacing-nim-code-calling-the-backend.
You need to have the header (if using {.importc.}`+{.header:"foo.h") or the low-level function name (if using `{.dynlib:"foo.so".}).
Besides the date, what are those functions though? Using those raw will be very different from PHP anyway so you might as well directly use Nim's equivalent.
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.