3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { function b($i = 0) { if ($i > 25000) { die; } if ($i % 5000 == 0) { echo memory_get_usage() . "\n"; } $this->b(++$i); } } $a=new a; $a->b();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vCYnK
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'b'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
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/vCYnK
function name:  b
number of ops:  16
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_INIT                                        !0      0
    7     1        IS_SMALLER                                               25000, !0
          2      > JMPZ                                                     ~1, ->4
    8     3    > > EXIT                                                     
   11     4    >   MOD                                              ~2      !0, 5000
          5        IS_EQUAL                                                 ~2, 0
          6      > JMPZ                                                     ~3, ->11
   12     7    >   INIT_FCALL                                               'memory_get_usage'
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      $4, '%0A'
         10        ECHO                                                     ~5
   15    11    >   INIT_METHOD_CALL                                         'b'
         12        PRE_INC                                          ~6      !0
         13        SEND_VAL_EX                                              ~6
         14        DO_FCALL                                      0          
   16    15      > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.05 ms | 1395 KiB | 15 Q