3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function read() { } } $test = new Test(); $i = 0; $start = microtime(true); while( $i < 100000) { method_exists($test, 'read'); $i++; } $end = microtime(true); echo PHP_EOL . $end - $start;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 9
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 9
Branch analysis from position: 16
Branch analysis from position: 9
filename:       /in/DCEnp
function name:  (null)
number of ops:  24
compiled vars:  !0 = $test, !1 = $i, !2 = $start, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $4      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
   12     3        ASSIGN                                                   !1, 0
   13     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !2, $8
   14     8      > JMP                                                      ->14
   15     9    >   INIT_FCALL                                               'method_exists'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'read'
         12        DO_ICALL                                                 
   16    13        PRE_INC                                                  !1
   14    14    >   IS_SMALLER                                               !1, 100000
         15      > JMPNZ                                                    ~12, ->9
   18    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $13     
         19        ASSIGN                                                   !3, $13
   19    20        SUB                                              ~15     !3, !2
         21        CONCAT                                           ~16     '%0A', ~15
         22        ECHO                                                     ~16
   20    23      > RETURN                                                   1

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

End of function read

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.5 ms | 1396 KiB | 17 Q