3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = array(); $test['a'] = 123; var_dump( isset($test['a']) ? $test['a'] : isset($test['b']) ? $test['b'] : "default" );
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.14, 8.4.1
Fatal error: Unparenthesized `a ? b : c ? d : e` is not supported. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /in/jsJR2 on line 8
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /in/jsJR2 on line 8 Notice: Undefined index: b in /in/jsJR2 on line 11 NULL
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.34, 7.3.0 - 7.3.33
Notice: Undefined index: b in /in/jsJR2 on line 11 NULL

preferences:
88.96 ms | 409 KiB | 5 Q