3v4l.org

run code in 300+ PHP versions simultaneously
<?php $t = array( array('a1'), array('a2'), array('a3'), array('a4'), array('a5'), array('a6'), array('a7'), array('a8'), array('a9'), array('a10') ); $max=100; function toto($arr=array()) { global $t; $arr += array_slice($t,count($arr),2); if(count($arr) < 6) { $arr = toto($arr); } return $arr; } print_r(toto());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/07HmM
function name:  (null)
number of ops:  8
compiled vars:  !0 = $t, !1 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   15     1        ASSIGN                                                   !1, 100
   25     2        INIT_FCALL                                               'print_r'
          3        INIT_FCALL                                               'toto'
          4        DO_FCALL                                      0  $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function toto:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/07HmM
function name:  toto
number of ops:  18
compiled vars:  !0 = $arr, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV_INIT                                        !0      <array>
   17     1        BIND_GLOBAL                                              !1, 't'
   18     2        INIT_FCALL                                               'array_slice'
          3        SEND_VAR                                                 !1
          4        COUNT                                            ~2      !0
          5        SEND_VAL                                                 ~2
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $3      
          8        ASSIGN_OP                                     1          !0, $3
   19     9        COUNT                                            ~5      !0
         10        IS_SMALLER                                               ~5, 6
         11      > JMPZ                                                     ~6, ->16
   20    12    >   INIT_FCALL_BY_NAME                                       'toto'
         13        SEND_VAR_EX                                              !0
         14        DO_FCALL                                      0  $7      
         15        ASSIGN                                                   !0, $7
   22    16    > > RETURN                                                   !0
   23    17*     > RETURN                                                   null

End of function toto

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.6 ms | 1398 KiB | 18 Q