3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vars = array(11, '11e1', '11f1', '11e0', '11f0', '11e2', '11f2'); $size = count($vars); for($ii = 0; $ii < $size; $ii++) { for($jj = $ii; $jj < $size; $jj++) { echo "$ii $jj\n"; } } var_dump($vars);
based on XiqYs
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
0 0 0 1 0 2 0 3 0 4 0 5 0 6 1 1 1 2 1 3 1 4 1 5 1 6 2 2 2 3 2 4 2 5 2 6 3 3 3 4 3 5 3 6 4 4 4 5 4 6 5 5 5 6 6 6 array(7) { [0]=> int(11) [1]=> string(4) "11e1" [2]=> string(4) "11f1" [3]=> string(4) "11e0" [4]=> string(4) "11f0" [5]=> string(4) "11e2" [6]=> string(4) "11f2" }