3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo1 = []; echo (int)($foo1['bar'] ?? 1); $foo2 = []; echo (int)$foo2['bar'] ?? 2;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Becjg
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo1, !1 = $foo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        FETCH_DIM_IS                                     ~3      !0, 'bar'
          2        COALESCE                                         ~4      ~3
          3        QM_ASSIGN                                        ~4      1
          4        CAST                                          4  ~5      ~4
          5        ECHO                                                     ~5
    5     6        ASSIGN                                                   !1, <array>
    6     7        FETCH_DIM_R                                      ~7      !1, 'bar'
          8        CAST                                          4  ~8      ~7
          9        COALESCE                                         ~9      ~8
         10        QM_ASSIGN                                        ~9      2
         11        ECHO                                                     ~9
    7    12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
248.32 ms | 1393 KiB | 13 Q