3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.32 ms | 1394 KiB | 17 Q