3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function method() { } } $obj = new Test; $ref = new ReflectionMethod($obj, 'method'); echo "Starting loop..."; $start = microtime(true); for ($i=0; $i<1e6; $i++) { $obj->method(array()); } echo "Took ", number_format((microtime(true)-$start)*1e3, 3), " ms";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
Branch analysis from position: 15
filename:       /in/LRX9D
function name:  (null)
number of ops:  34
compiled vars:  !0 = $obj, !1 = $ref, !2 = $start, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $4      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    8     3        NEW                                              $7      'ReflectionMethod'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'method'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
   10     8        ECHO                                                     'Starting+loop...'
   11     9        INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !2, $10
   12    13        ASSIGN                                                   !3, 0
         14      > JMP                                                      ->19
   13    15    >   INIT_METHOD_CALL                                         !0, 'method'
         16        SEND_VAL_EX                                              <array>
         17        DO_FCALL                                      0          
   12    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, 1.0e+6
         20      > JMPNZ                                                    ~15, ->15
   15    21    >   ECHO                                                     'Took+'
         22        INIT_FCALL                                               'number_format'
         23        INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $16     
         26        SUB                                              ~17     $16, !2
         27        MUL                                              ~18     ~17, 1000
         28        SEND_VAL                                                 ~18
         29        SEND_VAL                                                 3
         30        DO_ICALL                                         $19     
         31        ECHO                                                     $19
         32        ECHO                                                     '+ms'
         33      > RETURN                                                   1

Class Test:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LRX9D
function name:  method
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function method

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.59 ms | 1388 KiB | 17 Q