3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo {} $foo = new Foo; $start = microtime(true); echo get_class($foo); echo (microtime(true) - $start); echo "\n"; $start = microtime(true); echo (new ReflectionClass($foo))->getName(); echo (microtime(true) - $start);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NUBit
function name:  (null)
number of ops:  31
compiled vars:  !0 = $foo, !1 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    8     7        GET_CLASS                                        ~7      !0
          8        ECHO                                                     ~7
    9     9        INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      $8, !1
         13        ECHO                                                     ~9
   11    14        ECHO                                                     '%0A'
   13    15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !1, $10
   14    19        NEW                                              $12     'ReflectionClass'
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0          
         22        INIT_METHOD_CALL                                         $12, 'getName'
         23        DO_FCALL                                      0  $14     
         24        ECHO                                                     $14
   15    25        INIT_FCALL                                               'microtime'
         26        SEND_VAL                                                 <true>
         27        DO_ICALL                                         $15     
         28        SUB                                              ~16     $15, !1
         29        ECHO                                                     ~16
         30      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.07 ms | 1395 KiB | 15 Q