3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array('foo', 'bar'); function validate($data) { $first = array_shift($data); var_dump($data); return true; } validate($data); var_dump($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CN706
function name:  (null)
number of ops:  8
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'validate'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   13     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function validate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CN706
function name:  validate
number of ops:  10
compiled vars:  !0 = $data, !1 = $first
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'array_shift'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !1, $2
    8     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   <true>
   10     9*     > RETURN                                                   null

End of function validate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.21 ms | 1397 KiB | 18 Q