3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getData() { $a[0] = &$a; return $a; } function recurcive(&$data) { array_slice($data, 0); $data[] = 'X'; if (end($data[0]) !== 'X') { recurcive($data[0]); } } $data = getData(); recurcive($data);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6AASB
function name:  (null)
number of ops:  7
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'getdata'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   20     3        INIT_FCALL                                               'recurcive'
          4        SEND_REF                                                 !0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function getdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6AASB
function name:  getData
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_DIM_W                                      $1      !0, 0
          1        ASSIGN_REF                                               $1, !0
    7     2      > RETURN                                                   !0
    8     3*     > RETURN                                                   null

End of function getdata

Function recurcive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/6AASB
function name:  recurcive
number of ops:  19
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'array_slice'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_ICALL                                                 
   13     5        ASSIGN_DIM                                               !0
          6        OP_DATA                                                  'X'
   14     7        INIT_FCALL                                               'end'
          8        FETCH_DIM_W                                      $3      !0, 0
          9        SEND_REF                                                 $3
         10        DO_ICALL                                         $4      
         11        IS_NOT_IDENTICAL                                         $4, 'X'
         12      > JMPZ                                                     ~5, ->18
   15    13    >   INIT_FCALL_BY_NAME                                       'recurcive'
         14        CHECK_FUNC_ARG                                           
         15        FETCH_DIM_FUNC_ARG                               $6      !0, 0
         16        SEND_FUNC_ARG                                            $6
         17        DO_FCALL                                      0          
   17    18    > > RETURN                                                   null

End of function recurcive

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.96 ms | 1004 KiB | 17 Q