3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.26 ms | 1394 KiB | 17 Q