3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $temp1 = array(0, 1); $temp2 = array(0, null); $temp3 = array(0); echo '$temp1: ', var_export($temp1[1], true), PHP_EOL, '$temp2: ', var_export($temp2[1], true), PHP_EOL, '$temp3: ', var_export($temp3[1], true);
Output for 5.3.0 - 7.2.0
$temp1: 1 $temp2: NULL $temp3: Notice: Undefined offset: 1 in /in/8L3A6 on line 8 NULL
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.2.17
$temp1: 1 $temp2: NULL $temp3: Notice: Undefined offset: 1 in /in/8L3A6 on line 8 NULL
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
$temp1: 1 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/8L3A6 on line 6 PHP_EOL$temp2: NULL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/8L3A6 on line 7 PHP_EOL$temp3: Notice: Undefined offset: 1 in /in/8L3A6 on line 8 NULL