Re: php question

來自:樹雄
時間:Sat 2018-07-07 20:35:21

來自:樹雄
時間:Sat 2018-07-07 20:32:01

My來自:ywsing0
時間:Sat 2018-07-07 19:54:09

koala can u answer xd

$a=1; $b=2; $c=&$b; $d=++$c; echo $a+$b+$c+$d;

Should be 10.

No machine at hand to really test it. But,

$a = 1; (a=1, b=null, c=null, d=null)
$b = 2; (a=1, b=2, c=null, d=null)
$c = &$b; (a=1, b=2, c=&b=2, d=null)
$d = ++$c; (a=1, b=3, c=&b=3, d=3)

Neat,

https://www.tehplayground.com/EBxKeMcv8Ov1JBNf