3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time_start = microtime(true); for ($i = 1; $i <= 100000; ++$i) { $obj = new stdClass; spl_object_id($obj); } $time_end = microtime(true); $for_time = $time_end - $time_start; echo "call in loop took: " . number_format($for_time * 1000, 3) . "ms\n";
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 = 6
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 6
Branch analysis from position: 15
Branch analysis from position: 6
filename:       /in/jKtO6
function name:  (null)
number of ops:  30
compiled vars:  !0 = $time_start, !1 = $i, !2 = $obj, !3 = $time_end, !4 = $for_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $5      
          3        ASSIGN                                                   !0, $5
    4     4        ASSIGN                                                   !1, 1
          5      > JMP                                                      ->13
    5     6    >   NEW                                              $8      'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $8
    6     9        INIT_FCALL                                               'spl_object_id'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
    4    12        PRE_INC                                                  !1
         13    >   IS_SMALLER_OR_EQUAL                                      !1, 100000
         14      > JMPNZ                                                    ~13, ->6
    9    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $14     
         18        ASSIGN                                                   !3, $14
   10    19        SUB                                              ~16     !3, !0
         20        ASSIGN                                                   !4, ~16
   12    21        INIT_FCALL                                               'number_format'
         22        MUL                                              ~18     !4, 1000
         23        SEND_VAL                                                 ~18
         24        SEND_VAL                                                 3
         25        DO_ICALL                                         $19     
         26        CONCAT                                           ~20     'call+in+loop+took%3A+', $19
         27        CONCAT                                           ~21     ~20, 'ms%0A'
         28        ECHO                                                     ~21
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.27 ms | 1005 KiB | 16 Q