3v4l.org

run code in 500+ PHP versions simultaneously
<?php declare(ticks=1); register_tick_function(function() { echo " tick \n"; }); class foo { function bar() { for($i = 0; $i < 10; $i++) { echo $i; } } } $A = new foo(); $A->bar();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8I083
function name:  (null)
number of ops:  14
compiled vars:  !0 = $A
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   TICKS                                                        
    4     1        INIT_FCALL                                                   'register_tick_function'
          2        DECLARE_LAMBDA_FUNCTION                              ~1      [0]
    6     3        SEND_VAL                                                     ~1
    4     4        DO_ICALL                                                     
    6     5        TICKS                                                        
   17     6        NEW                                                  $3      'foo'
          7        DO_FCALL                                          0          
          8        ASSIGN                                                       !0, $3
          9        TICKS                                                        
   18    10        INIT_METHOD_CALL                                             !0, 'bar'
         11        DO_FCALL                                          0          
         12        TICKS                                                        
         13      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8I083
function name:  {closure:/in/8I083:4}
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                         '+tick+%0A'
          1        TICKS                                                        
    6     2      > RETURN                                                       null

End of Dynamic Function 0

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 2
Branch analysis from position: 7
Branch analysis from position: 2
filename:       /in/8I083
function name:  bar
number of ops:  9
compiled vars:  !0 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                       !0, 0
          1      > JMP                                                          ->5
   11     2    >   ECHO                                                         !0
          3        TICKS                                                        
   10     4        PRE_INC                                                      !0
          5    >   IS_SMALLER                                                   !0, 10
          6      > JMPNZ                                                        ~3, ->2
          7    >   TICKS                                                        
   13     8      > RETURN                                                       null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
177.15 ms | 2644 KiB | 14 Q