3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(-1); $arry = array(1=>1); $notarry = NULL; $intvar = 123; echo "1. arry[1] = " . $arry[1] . "\n"; echo "2. arry[2] = " . $arry[2] . "\n"; echo "3. intvar[0] = " . $intvar[0] . "\n"; echo "4. intvar[1] = " . $intvar[1] . "\n"; echo "5. notarry[1] = " . $notarry[1] . "\n";
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
1. arry[1] = 1 Notice: Undefined offset: 2 in /in/juVPP on line 7 2. arry[2] = 3. intvar[0] = 4. intvar[1] = 5. notarry[1] =
Output for hhvm-3.10.0 - 3.12.0
1. arry[1] = 1 Notice: Undefined index: 2 in /in/juVPP on line 7 2. arry[2] = 3. intvar[0] = 4. intvar[1] = 5. notarry[1] =
Output for 4.3.0 - 5.2.17
1. arry[1] = 1 Notice: Undefined offset: 2 in /in/juVPP on line 7 2. arry[2] = 3. intvar[0] = 4. intvar[1] = 5. notarry[1] =