3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = [ 1 => null, 2 => null, 3 => 1, ]; $a = $array[0] ?? 0; var_dump($a); $b = $array[1] ?? 0; var_dump($b); $c = $array[3] ?? 0; var_dump($c);
Output for 7.3.0rc3
int(0) int(0) int(1)