go to bug id or search bugs for
Using the -z/--zend_extension option to load a zend extension when using php from the CLI doesn't seem to work on Windows. I tested using PHP versions 5.6.40, 7.2.16, and 7.3.3.
In my particular case, I was trying to load xdebug.
php -z <path to xdebug> -m
The above results in no modules listed under [Zend Modules]
php -z <path to xdebug> --re xdebug
php -z <path to xdebug> --rz xdebug
php -z <path to xdebug> --ri xdebug
The above all result in an error stating that xdebug does not exist.
php -d zend_extension=<path to xdebug>
The above can be used as a workaround as it loads the extension as expected.
Please let me know if I can provide any additional information.
Add a Patch
Add a Pull Request
Also happens in other operating systems ...
The reason -m doesn't show it's loaded is clear, they are different getopt blocks.
But even when you run a script with get_loaded_extensions dump, the zend extension is not loaded (tested with opcache which registers a module, the module is not registered).