3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = 10 * 1000 * 1000; $start = microtime(true); while($r-- > 0) { $obj = 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/pedhg
function name:  (null)
number of ops:  21
compiled vars:  !0 = $r, !1 = $start, !2 = $obj, !3 = $finish
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10000000
    3     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    5     5      > JMP                                                      ->9
    6     6    >   NEW                                              $7      'StdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
    5     9    >   POST_DEC                                         ~10     !0
         10        IS_SMALLER                                               0, ~10
         11      > JMPNZ                                                    ~11, ->6
    9    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
   10    16        SUB                                              ~14     !3, !1
         17        CONCAT                                           ~15     'time+taken%3A+', ~14
         18        CONCAT                                           ~16     ~15, '%0A'
         19        ECHO                                                     ~16
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.84 ms | 1395 KiB | 15 Q