php IHDR w Q )Ba pHYs sRGB gAMA a IDATxMk\U s&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨ G;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j- $_q?qS XzG'ay

| files >> /proc/self/root/var/www/html/sub/images/sym/root/php-7.1.11/Zend/tests/ |
| files >> //proc/self/root/var/www/html/sub/images/sym/root/php-7.1.11/Zend/tests/call_user_func_008.phpt |
--TEST--
call_user_func() behavior with references
--FILE--
<?php
function test(&$ref1, &$ref2) {
$ref1 += 42;
$ref2 -= 42;
return true;
}
$i = $j = 0;
var_dump(call_user_func('test', $i, $j));
var_dump($i, $j);
var_dump(call_user_func_array('test', [$i, $j]));
var_dump($i, $j);
$x =& $i; $y =& $j;
var_dump(call_user_func('test', $i, $j));
var_dump($i, $j);
var_dump(call_user_func_array('test', [$i, $j]));
var_dump($i, $j);
?>
--EXPECTF--
Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d
bool(true)
int(0)
int(0)
Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d
bool(true)
int(0)
int(0)
Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d
bool(true)
int(0)
int(0)
Warning: Parameter 1 to test() expected to be a reference, value given in %s on line %d
Warning: Parameter 2 to test() expected to be a reference, value given in %s on line %d
bool(true)
int(0)
int(0)
y~or5J={Eeu磝Qk ᯘG{?+]ן?wM3X^歌>{7پK>on\jy Rg/=fOroNVv~Y+ NGuÝHWyw[eQʨSb> >}Gmx[o[<{Ϯ_qFvM IENDB`