3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = ['bar' => 'boo']; $baz = ['boo' => 'bay']; $bar = $baz[$foo['bar'] ?? ''] ?? '' ; var_dump($bar); $foo = []; $baz = []; $bar = $baz[$foo['bar'] ?? ''] ?? '' ; var_dump($bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bnFPV
function name:  (null)
number of ops:  25
compiled vars:  !0 = $foo, !1 = $baz, !2 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    5     2        FETCH_DIM_IS                                     ~5      !0, 'bar'
          3        COALESCE                                         ~6      ~5
          4        QM_ASSIGN                                        ~6      ''
          5        FETCH_DIM_IS                                     ~7      !1, ~6
          6        COALESCE                                         ~8      ~7
          7        QM_ASSIGN                                        ~8      ''
          8        ASSIGN                                                   !2, ~8
    6     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
    9    12        ASSIGN                                                   !0, <array>
   10    13        ASSIGN                                                   !1, <array>
   11    14        FETCH_DIM_IS                                     ~13     !0, 'bar'
         15        COALESCE                                         ~14     ~13
         16        QM_ASSIGN                                        ~14     ''
         17        FETCH_DIM_IS                                     ~15     !1, ~14
         18        COALESCE                                         ~16     ~15
         19        QM_ASSIGN                                        ~16     ''
         20        ASSIGN                                                   !2, ~16
   12    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.25 ms | 1436 KiB | 14 Q