WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/php/72/src/tests/lang/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/php/72/src/tests/lang/engine_assignExecutionOrder_001.phpt
--TEST--
Evaluation order during assignments.
--FILE--
<?php

function f() {
	echo "in f()\n";
	return "name";
}

function g() {
	echo "in g()\n";
	return "assigned value";
}


echo "\n\nOrder with local assignment:\n";
${f()} = g();
var_dump($name);

echo "\n\nOrder with array assignment:\n";
$a[f()] = g();
var_dump($a);

echo "\n\nOrder with object property assignment:\n";
$oa = new stdClass;
$oa->${f()} = g();
var_dump($oa);

echo "\n\nOrder with nested object property assignment:\n";
$ob = new stdClass;
$ob->o1 = new stdClass;
$ob->o1->o2 = new stdClass;
$ob->o1->o2->${f()} = g();
var_dump($ob);

echo "\n\nOrder with dim_list property assignment:\n";
$oc = new stdClass;
$oc->a[${f()}] = g();
var_dump($oc);


class C {
	public static $name = "original";
	public static $a = array();
	public static $string = "hello";
}
echo "\n\nOrder with static property assignment:\n";
C::${f()} = g();
var_dump(C::$name);

echo "\n\nOrder with static array property assignment:\n";
C::$a[f()] = g();
var_dump(C::$a);

echo "\n\nOrder with indexed string assignment:\n";
$string = "hello";
function getOffset() {
	echo "in getOffset()\n";
	return 0;
}
function newChar() {
	echo "in newChar()\n";
	return 'j';
}
$string[getOffset()] = newChar();
var_dump($string);

echo "\n\nOrder with static string property assignment:\n";
C::$string[getOffset()] = newChar();
var_dump(C::$string);

?>
--EXPECTF--
Order with local assignment:
in f()
in g()
%string|unicode%(14) "assigned value"


Order with array assignment:
in f()
in g()
array(1) {
  ["name"]=>
  %string|unicode%(14) "assigned value"
}


Order with object property assignment:
in f()
in g()
object(stdClass)#%d (1) {
  ["assigned value"]=>
  %string|unicode%(14) "assigned value"
}


Order with nested object property assignment:
in f()
in g()
object(stdClass)#%d (1) {
  ["o1"]=>
  object(stdClass)#%d (1) {
    ["o2"]=>
    object(stdClass)#%d (1) {
      ["assigned value"]=>
      %string|unicode%(14) "assigned value"
    }
  }
}


Order with dim_list property assignment:
in f()
in g()
object(stdClass)#%d (1) {
  ["a"]=>
  array(1) {
    ["assigned value"]=>
    %string|unicode%(14) "assigned value"
  }
}


Order with static property assignment:
in f()
in g()
%string|unicode%(14) "assigned value"


Order with static array property assignment:
in f()
in g()
array(1) {
  ["name"]=>
  %string|unicode%(14) "assigned value"
}


Order with indexed string assignment:
in getOffset()
in newChar()
%string|unicode%(5) "jello"


Order with static string property assignment:
in getOffset()
in newChar()
%string|unicode%(5) "jello"

Youez - 2016 - github.com/yon3zu
LinuXploit