3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.45 ms | 1395 KiB | 15 Q