3v4l.org

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

Class Test:
Function method:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEfDq
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.31 ms | 1400 KiB | 17 Q