3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time=microtime(1); for ($i=0;$i<1000000;$i++) new stdClass; echo microtime(1)-$time,': new stdClass'."\n"; $time=microtime(1); for ($i=0;$i<1000000;$i++) (object)[]; echo microtime(1)-$time,': (object)[]'."\n";
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 = 27
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 44) Position 1 = 29, Position 2 = 24
Branch analysis from position: 29
Branch analysis from position: 24
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/aHTDP
function name:  (null)
number of ops:  36
compiled vars:  !0 = $time, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'microtime'
          1        SEND_VAL                                                 1
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    4     4        ASSIGN                                                   !1, 0
          5      > JMP                                                      ->10
    5     6    >   NEW                                              $5      'stdClass'
          7        DO_FCALL                                      0          
          8        FREE                                                     $5
    4     9        PRE_INC                                                  !1
         10    >   IS_SMALLER                                               !1, 1000000
         11      > JMPNZ                                                    ~8, ->6
    6    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 1
         14        DO_ICALL                                         $9      
         15        SUB                                              ~10     $9, !0
         16        ECHO                                                     ~10
         17        ECHO                                                     '%3A+new+stdClass%0A'
    8    18        INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 1
         20        DO_ICALL                                         $11     
         21        ASSIGN                                                   !0, $11
    9    22        ASSIGN                                                   !1, 0
         23      > JMP                                                      ->27
   10    24    >   CAST                                          8  ~14     <array>
         25        FREE                                                     ~14
    9    26        PRE_INC                                                  !1
         27    >   IS_SMALLER                                               !1, 1000000
         28      > JMPNZ                                                    ~16, ->24
   11    29    >   INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 1
         31        DO_ICALL                                         $17     
         32        SUB                                              ~18     $17, !0
         33        ECHO                                                     ~18
         34        ECHO                                                     '%3A+%28object%29%5B%5D%0A'
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.28 ms | 1396 KiB | 15 Q