PowerBASIC Users Meeting Point
PHP and PowerBasic - Printable Version

+- PowerBASIC Users Meeting Point (https://pump.richheimer.de)
+-- Forum: User to User Discussions (https://pump.richheimer.de/forumdisplay.php?fid=3)
+--- Forum: PowerBASIC for Windows (https://pump.richheimer.de/forumdisplay.php?fid=4)
+--- Thread: PHP and PowerBasic (/showthread.php?tid=144)



PHP and PowerBasic - Fim Wästberg - 24.10.2026

Does anyone have experience with having a webpage—via PHP—call a function (e.g., in a DLL) written in PowerBasic?
/Fim W.


RE: PHP and PowerBasic - Dale Yarker - 24.10.2026

Quote:Does anyone have experience with having a webpage—via PHP—call a function (e.g., in a DLL) written in PowerBasic?
No, but a little research-

SDECL is default for PB created DLLs.
It is also the calling convention used in Windows APIs.

Q: can php call a windows api dll function
A: "Yes, PHP can call Windows API DLL functions directly.
The standard, modern way to do this is using the PHP FFI (Foreign Function Interface) extension, which was introduced in PHP 7.4."

conclusion: PHP can call DLL functions compiled in PB.

check your PHP is 7.4 or later
search or FFI examples

Cheers,


RE: PHP and PowerBasic - Fim Wästberg - 24.10.2026

Thanks,
Have already checked that.
/fim W.