3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = new stdClass; $b = new stdClass; $c = new stdClass; $array1 = array($a, $b, $c); for ($i = 0; $i < 3; $i++) { for ($j = 0; $j <= $i; $j++) { $x = $array1[$i]; $y = $array2[$j]; if ($x < $y) print("$i<$j "); if ($x > $y) print("$i>$j "); if ($x === $y) print("$i!=$j "); print(" "); } print("\n"); }
based on 8kn2J
Output for 5.0.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined variable: array2 in /in/B9X8U on line 12 0>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 1>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 1>1 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>1 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>2
Output for 5.0.0 - 5.0.3
Notice: Undefined variable: array2 in /in/B9X8U on line 12 0>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 1>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 1>1 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>0 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>1 Notice: Undefined variable: array2 in /in/B9X8U on line 12 2>2
Output for 4.3.0 - 4.4.9
Notice: Undefined variable: array2 in /in/B9X8U on line 12 Notice: Undefined variable: array2 in /in/B9X8U on line 12 Notice: Undefined variable: array2 in /in/B9X8U on line 12 Notice: Undefined variable: array2 in /in/B9X8U on line 12 Notice: Undefined variable: array2 in /in/B9X8U on line 12 Notice: Undefined variable: array2 in /in/B9X8U on line 12