3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = array( array( 'foo' => 80, 'bar' => 81, 'baz' => 82 ) ); $init = $arr[0]; $l = count($init); while(count($arr) < 4) { foreach($init as &$prop) { $prop += l; } $arr[] = $init; } var_dump($arr);
based on O0TIl
Output for 7.2.0
Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Warning: Use of undefined constant l - assumed 'l' (this will throw an Error in a future version of PHP) in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 array(4) { [0]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> int(82) } [1]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [2]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [3]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } }
Output for 7.1.0 - 7.1.10
Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Warning: A non-numeric value encountered in /in/NZbQo on line 15 array(4) { [0]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> int(82) } [1]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [2]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [3]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } }
Output for 5.3.19 - 7.0.20
Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 Notice: Use of undefined constant l - assumed 'l' in /in/NZbQo on line 15 array(4) { [0]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> int(82) } [1]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [2]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } [3]=> array(3) { ["foo"]=> int(80) ["bar"]=> int(81) ["baz"]=> &int(82) } }