3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { return array("foo","bar","foobar","barfoo","tofu"); } echo(array_shift(foo())); // prints "foo" echo(array_pop(foo())); // prints "tofu" foreach(foo() as $key=>$val) { echo($val); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Ov0e8
function name:  (null)
number of ops:  21
compiled vars:  !0 = $val, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'array_shift'
          1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $2      
          3        SEND_VAR_NO_REF                               0          $2
          4        DO_ICALL                                         $3      
          5        ECHO                                                     $3
    7     6        INIT_FCALL                                               'array_pop'
          7        INIT_FCALL                                               'foo'
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR_NO_REF                               0          $4
         10        DO_ICALL                                         $5      
         11        ECHO                                                     $5
    9    12        INIT_FCALL                                               'foo'
         13        DO_FCALL                                      0  $6      
         14      > FE_RESET_R                                       $7      $6, ->19
         15    > > FE_FETCH_R                                       ~8      $7, !0, ->19
         16    >   ASSIGN                                                   !1, ~8
   10    17        ECHO                                                     !0
    9    18      > JMP                                                      ->15
         19    >   FE_FREE                                                  $7
   11    20      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.68 ms | 1398 KiB | 20 Q