3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL); echo $_GET['aaa']; $user = $_GET['xxx'] ?? 'nobody'; var_dump($user); $null = ''; var_dump($null??'haha'); $arr = ['a' => 1]; echo $arr[0]; var_dump($arr['b'] ?? 'bbbb');
Output for 7.0.0 - 7.2.0
Notice: Undefined index: aaa in /in/lSEef on line 3 string(6) "nobody" string(0) "" Notice: Undefined offset: 0 in /in/lSEef on line 9 string(4) "bbbb"
Output for 5.3.21 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/lSEef on line 4
Process exited with code 255.