????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.191 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/tests/lang/ |
Upload File : |
--TEST--
Ensure by value assignments leave temporaries on the stack, for all sorts of assignees.
--FILE--
<?php
error_reporting(E_ALL & ~E_STRICT);
function f() { return 0; }
$a[0][1] = 'good';
$a[1][1] = 'bad';
echo "\n" . '$i=f(): ';
echo $a[$i=f()][++$i];
unset($i);
echo "\n" . '$$x=f(): ';
$x='i';
echo $a[$$x=f()][++$$x];
unset($i, $x);
echo "\n" . '${\'i\'}=f(): ';
echo $a[${'i'}=f()][++${'i'}];
unset(${'i'});
echo "\n" . '$i[0]=f(): ';
echo $a[$i[0]=f()][++$i[0]];
unset($i);
echo "\n" . '$i[0][0]=f(): ';
echo $a[$i[0][0]=f()][++$i[0][0]];
unset($i);
echo "\n" . '$i->p=f(): ';
echo $a[$i->p=f()][++$i->p];
unset($i);
echo "\n" . '$i->p->q=f(): ';
echo $a[$i->p->q=f()][++$i->p->q];
unset($i);
echo "\n" . '$i->p[0]=f(): ';
echo $a[$i->p[0]=f()][++$i->p[0]];
unset($i);
echo "\n" . '$i->p[0]->p=f(): ';
echo $a[$i->p[0]->p=f()][++$i->p[0]->p];
unset($i);
Class C {
static $p;
}
echo "\n" . 'C::$p=f(): ';
echo $a[C::$p=f()][++C::$p];
echo "\n" . 'C::$p[0]=f(): ';
C::$p = array();
echo $a[C::$p[0]=f()][++C::$p[0]];
echo "\n" . 'C::$p->q=f(): ';
C::$p = new stdclass;
echo $a[C::$p->q=f()][++C::$p->q];
?>
--EXPECTF--
$i=f(): good
$$x=f(): good
${'i'}=f(): good
$i[0]=f(): good
$i[0][0]=f(): good
$i->p=f():
Warning: Creating default object from empty value in %s on line %d
good
$i->p->q=f():
Warning: Creating default object from empty value in %s on line %d
good
$i->p[0]=f(): good
$i->p[0]->p=f():
Warning: Creating default object from empty value in %s on line %d
good
C::$p=f(): good
C::$p[0]=f(): good
C::$p->q=f(): good