3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'a'; $b = 'b'; $c = new stdclass; $c->prop = 'property'; $array = [ 'first' => 'first', ]; echo $notExisting ?? $c->notExisting ?? $c->prop; echo $array['nonExisting'] ?? $array['first'];
based on n8ojt
Output for 7.0.0 - 7.2.0
propertyfirst
Output for 5.4.2 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/gMEE4 on line 12
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/gMEE4 on line 7
Process exited with code 255.