3v4l.org

run code in 300+ PHP versions simultaneously
<?php $c = []; $a0 = array_shift($c) ? array_shift($c) : 'a0'; $b0 = array_shift($c) ?: 'b0'; $d = [42]; $a1 = array_shift($d) ? array_shift($d) : 'a1'; $b1 = array_shift($d) ?: 'b1';

preferences:
49.31 ms | 402 KiB | 5 Q