3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.59 ms | 1385 KiB | 17 Q