3v4l.org

run code in 200+ php & hhvm versions
<?php $foo1 = []; echo (int)($foo1['bar'] ?? 1); $foo2 = []; echo (int)$foo2['bar'] ?? 2;
based on nRa8j
Output for 7.1.25 - 7.3.5
1 Notice: Undefined index: bar in /in/Becjg on line 6 0