3v4l.org

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

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.97 ms | 1400 KiB | 17 Q