3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo(array_shift(foo())); // prints "foo" echo(array_pop(foo())); // prints "tofu" function foo() { return array("foo","bar","foobar","barfoo","tofu"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/voQIS
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'array_shift'
          1        INIT_FCALL_BY_NAME                                       'foo'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR_NO_REF                               0          $0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
    4     6        INIT_FCALL                                               'array_pop'
          7        INIT_FCALL_BY_NAME                                       'foo'
          8        DO_FCALL                                      0  $2      
          9        SEND_VAR_NO_REF                               0          $2
         10        DO_ICALL                                         $3      
         11        ECHO                                                     $3
    8    12      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/voQIS
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   <array>
    8     1*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
231.45 ms | 1394 KiB | 17 Q