3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function &pre_inc(&$a) { return ++$a; } $a = 5; $b = &$a; //echo $a; //echo $b; $c = &pre_inc($a); echo $c; echo $d; $d = $b++; echo $c; echo $d; echo $c.$d;
Output for 5.6.8 - 5.6.28, 7.0.0 - 7.1.0
Notice: Only variable references should be returned by reference in /in/JrjhN on line 4 6 Notice: Undefined variable: d in /in/JrjhN on line 13 6666
Output for hhvm-3.12.0
6 Notice: Undefined variable: d in /in/JrjhN on line 13 6666
Output for hhvm-3.10.0
6 Notice: Undefined variable: d in /in/JrjhN on line -1 6666
Output for 5.0.4 - 5.5.35
6 Notice: Undefined variable: d in /in/JrjhN on line 13 7676
Output for 4.3.0 - 5.0.3
6 Notice: Undefined variable: d in /in/JrjhN on line 13 7676