3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $c = new stdclass; $c->prop = 'property'; $array = [ 'first' => 'first', ]; echo $notExisting ?? $c->notExisting ?? $c->prop; echo "\n"; echo $array['nonExisting'] ?? $array['first']; echo "\n";
based on dps6H
Output for 7.0.0 - 7.2.0
property first
Output for 5.4.2 - 5.6.28
Parse error: syntax error, unexpected '?' in /in/q0g2O on line 10
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/q0g2O on line 6
Process exited with code 255.