3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = 10 * 1000; $start = microtime(true); while($r-- > 0) { new StdClass(); } $finish = microtime(true); echo "time taken: " . ($finish - $start) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
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/FB2f2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $r, !1 = $start, !2 = $finish
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10000
    4     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5      > JMP                                                      ->9
    7     6    >   NEW                                              $6      'StdClass'
          7        DO_FCALL                                      0          
          8        FREE                                                     $6
    6     9    >   POST_DEC                                         ~8      !0
         10        IS_SMALLER                                               0, ~8
         11      > JMPNZ                                                    ~9, ->6
   10    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !2, $10
   11    16        SUB                                              ~12     !2, !1
         17        CONCAT                                           ~13     'time+taken%3A+', ~12
         18        CONCAT                                           ~14     ~13, '%0A'
         19        ECHO                                                     ~14
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.11 ms | 1395 KiB | 15 Q