3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_array(){ return array('a','b'); } $array = my_array(); $item1 = array_pop($array); // Valid $item2 = array_pop(my_array()); // Invalid
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oD6CZ
function name:  (null)
number of ops:  14
compiled vars:  !0 = $array, !1 = $item1, !2 = $item2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'my_array'
          1        DO_FCALL                                      0  $3      
          2        ASSIGN                                                   !0, $3
    9     3        INIT_FCALL                                               'array_pop'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   11     7        INIT_FCALL                                               'array_pop'
          8        INIT_FCALL                                               'my_array'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR_NO_REF                               0          $7
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
         13      > RETURN                                                   1

Function my_array:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oD6CZ
function name:  my_array
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 my_array

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.84 ms | 1397 KiB | 17 Q