3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [1,2,3]; var_dump($array[4]??'notdefined'); var_dump($array[1]??'notdefined');
based on 4mWqo
Output for 7.3.0 - 7.3.27, 7.4.0 - 7.4.16, 8.0.0 - 8.0.3
string(10) "notdefined" int(2)