Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpdbg -h options doesn't list the -z option #9669

Closed
ccccmd opened this issue Oct 2, 2022 · 2 comments
Closed

phpdbg -h options doesn't list the -z option #9669

ccccmd opened this issue Oct 2, 2022 · 2 comments

Comments

@ccccmd
Copy link

ccccmd commented Oct 2, 2022

The "-h" option of phpdbg misses an option "z".

  • For the option "z", the following code appears during option parsing and modifies the zend_extensions_len and zend_extensions in sapi/phpdbg/phpdbg.c:1437-1443 for version 8.0.23.
			case 'z':
				zend_extensions_len++;
				if (zend_extensions) {
					zend_extensions = realloc(zend_extensions, sizeof(char*) * zend_extensions_len);
				} else zend_extensions = malloc(sizeof(char*) * zend_extensions_len);
				zend_extensions[zend_extensions_len-1] = strdup(php_optarg);
			break;

But it does not appear in the document provided by "-h".

It may prevent users from using the relevant function.

@cmb69
Copy link
Contributor

cmb69 commented Oct 4, 2022

Indeed. The -z option is for loading a zend_extension (same as -dzend_extension=). That should be fixed in php-src, though.

@cmb69 cmb69 transferred this issue from php/doc-en Oct 4, 2022
@cmb69 cmb69 changed the title The help document of phpdbg misses an option phpdbg -h options doesn't list the -z option Oct 4, 2022
@adsr
Copy link
Contributor

adsr commented Oct 22, 2022

#9713

nielsdos added a commit that referenced this issue Jul 7, 2023
* PHP-8.1:
  Fix GH-9669: phpdbg -h options doesn't list the -z option
nielsdos added a commit that referenced this issue Jul 7, 2023
* PHP-8.2:
  Fix GH-9669: phpdbg -h options doesn't list the -z option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants