3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Module { protected $_name; protected $_version; public function __construct(string $name, string $version) { $this->_name = $name; $this->_version = $version; } } $s = microtime(true); for ($i = 0; $i < 1000; $i++) { new Module('Framework', '1.10'); } var_dump(microtime(true) - $s); $s = microtime(true); for ($i = 0; $i < 1000; $i++) { new class extends Module { public function __construct() { } protected $_name = 'Framework'; protected $_version = '1.10'; }; } var_dump(microtime(true) - $s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 27
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 27
Branch analysis from position: 34
Branch analysis from position: 27
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 6
Branch analysis from position: 14
Branch analysis from position: 6
filename:       /in/EvnKv
function name:  (null)
number of ops:  42
compiled vars:  !0 = $s, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   16     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->12
   18     6    >   NEW                                              $5      'Module'
          7        SEND_VAL_EX                                              'Framework'
          8        SEND_VAL_EX                                              '1.10'
          9        DO_FCALL                                      0          
         10        FREE                                                     $5
   16    11        PRE_INC                                                  !1
         12    >   IS_SMALLER                                               !1, 1000
         13      > JMPNZ                                                    ~8, ->6
   21    14    >   INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $9      
         18        SUB                                              ~10     $9, !0
         19        SEND_VAL                                                 ~10
         20        DO_ICALL                                                 
   24    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $12     
         24        ASSIGN                                                   !0, $12
   25    25        ASSIGN                                                   !1, 0
         26      > JMP                                                      ->32
   27    27    >   DECLARE_ANON_CLASS                               <undef> 'module'
         28        NEW                                              $16     $15
         29        DO_FCALL                                      0          
         30        FREE                                                     $16
   25    31        PRE_INC                                                  !1
         32    >   IS_SMALLER                                               !1, 1000
         33      > JMPNZ                                                    ~19, ->27
   37    34    >   INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'microtime'
         36        SEND_VAL                                                 <true>
         37        DO_ICALL                                         $20     
         38        SUB                                              ~21     $20, !0
         39        SEND_VAL                                                 ~21
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Class Module:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EvnKv
function name:  __construct
number of ops:  7
compiled vars:  !0 = $name, !1 = $version
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ASSIGN_OBJ                                               '_name'
          3        OP_DATA                                                  !0
   11     4        ASSIGN_OBJ                                               '_version'
          5        OP_DATA                                                  !1
   12     6      > RETURN                                                   null

End of function __construct

End of class Module.

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

End of function __construct

End of class Module@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.53 ms | 1400 KiB | 17 Q