3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.02 ms | 1394 KiB | 15 Q