mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
Duplicate array only if neccessary
This commit is contained in:
parent
7faac0267f
commit
c8ff3421a0
1 changed files with 4 additions and 1 deletions
|
@ -1365,11 +1365,14 @@ PHP_FUNCTION(extract)
|
|||
int extract_refs = 0;
|
||||
zend_array *symbol_table;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a/|lz/", &var_array, &extract_type, &prefix) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|lz/", &var_array, &extract_type, &prefix) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
extract_refs = (extract_type & EXTR_REFS);
|
||||
if (extract_refs) {
|
||||
SEPARATE_ZVAL(var_array);
|
||||
}
|
||||
extract_type &= 0xff;
|
||||
|
||||
if (extract_type < EXTR_OVERWRITE || extract_type > EXTR_IF_EXISTS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue