3v4l.org

run code in 300+ PHP versions simultaneously
<?php $max=100; function toto($arr=array()) { $arr[] = count($arr); if(count($arr) < 10) { $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/jqgEA
function name:  (null)
number of ops:  7
compiled vars:  !0 = $max
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 100
   12     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'toto'
          3        DO_FCALL                                      0  $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function toto:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/jqgEA
function name:  toto
number of ops:  13
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <array>
    5     1        COUNT                                            ~2      !0
          2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  ~2
    6     4        COUNT                                            ~3      !0
          5        IS_SMALLER                                               ~3, 10
          6      > JMPZ                                                     ~4, ->11
    7     7    >   INIT_FCALL_BY_NAME                                       'toto'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0  $5      
         10        ASSIGN                                                   !0, $5
    9    11    > > RETURN                                                   !0
   10    12*     > RETURN                                                   null

End of function toto

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.48 ms | 1397 KiB | 16 Q