3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $x=[1, 2, 3]; } $cycles = 1000000; $t = microtime(true); for ($i=0;$i<$cycles;$i++) { $f = new foo; } $t = microtime(true) - $t; echo intval($t*1000000);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
Branch analysis from position: 7
filename:       /in/QhQRW
function name:  (null)
number of ops:  22
compiled vars:  !0 = $cycles, !1 = $t, !2 = $i, !3 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 1000000
    8     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    9     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->11
   10     7    >   NEW                                              $8      'foo'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $8
    9    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, !0
         12      > JMPNZ                                                    ~12, ->7
   12    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $13     
         16        SUB                                              ~14     $13, !1
         17        ASSIGN                                                   !1, ~14
   13    18        MUL                                              ~16     !1, 1000000
         19        CAST                                          4  ~17     ~16
         20        ECHO                                                     ~17
         21      > RETURN                                                   1

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.73 ms | 1395 KiB | 15 Q