mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix handling of parse_str() with unpack in optimizer
This commit is contained in:
parent
70f0546885
commit
3be92120ba
15
Zend/tests/parse_str_with_unpack.phpt
Normal file
15
Zend/tests/parse_str_with_unpack.phpt
Normal file
@ -0,0 +1,15 @@
|
||||
--TEST--
|
||||
Calling parse_str through argument unpacking
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
function test() {
|
||||
$i = 0;
|
||||
parse_str(...["i=41"]);
|
||||
var_dump($i + 1);
|
||||
}
|
||||
test();
|
||||
|
||||
?>
|
||||
--EXPECT--
|
||||
int(42)
|
@ -596,9 +596,9 @@ uint32_t zend_optimizer_classify_function(zend_string *name, uint32_t num_args)
|
||||
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||
} else if (zend_string_equals_literal(name, "compact")) {
|
||||
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||
} else if (zend_string_equals_literal(name, "parse_str") && num_args == 1) {
|
||||
} else if (zend_string_equals_literal(name, "parse_str") && num_args <= 1) {
|
||||
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||
} else if (zend_string_equals_literal(name, "mb_parse_str") && num_args == 1) {
|
||||
} else if (zend_string_equals_literal(name, "mb_parse_str") && num_args <= 1) {
|
||||
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||
} else if (zend_string_equals_literal(name, "get_defined_vars")) {
|
||||
return ZEND_FUNC_INDIRECT_VAR_ACCESS;
|
||||
|
Loading…
Reference in New Issue
Block a user