3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 1000000; class ValueObject {} $time = microtime(true); for ($i = 0; $i < $count; $i++) { $item = new ValueObject(); } $spentTime = microtime(true) - $time; echo 'create array test took ' . number_format($spentTime, 3) . ' seconds';
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/ktH8m
function name:  (null)
number of ops:  26
compiled vars:  !0 = $count, !1 = $time, !2 = $i, !3 = $item, !4 = $spentTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1000000
    7     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    9     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->11
   10     7    >   NEW                                              $9      'ValueObject'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !3, $9
    9    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, !0
         12      > JMPNZ                                                    ~13, ->7
   13    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $14     
         16        SUB                                              ~15     $14, !1
         17        ASSIGN                                                   !4, ~15
   15    18        INIT_FCALL                                               'number_format'
         19        SEND_VAR                                                 !4
         20        SEND_VAL                                                 3
         21        DO_ICALL                                         $17     
         22        CONCAT                                           ~18     'create+array+test+took+', $17
         23        CONCAT                                           ~19     ~18, '+seconds'
         24        ECHO                                                     ~19
         25      > RETURN                                                   1

Class ValueObject: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.39 ms | 1400 KiB | 17 Q