3v4l.org

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

Class ValueObject: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.21 ms | 1388 KiB | 17 Q