3v4l.org

run code in 300+ PHP versions simultaneously
<?php list($x,$y) = microtime(); $a = ''; for($i=0; $i<1000000; $i++) $a = 'yay'; $t = microtime(true); echo round((($n+$p)-$x-$y)*1000); list($x,$y) = microtime(); $a = ''; for($i=0; $i<1000000; $i++) $a = "yay"; echo round(microtime(true)-$t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 10
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 36
Branch analysis from position: 40
Branch analysis from position: 36
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 10
Branch analysis from position: 14
Branch analysis from position: 10
filename:       /in/0ariD
function name:  (null)
number of ops:  49
compiled vars:  !0 = $x, !1 = $y, !2 = $a, !3 = $i, !4 = $t, !5 = $n, !6 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'microtime'
          1        DO_ICALL                                         $7      
          2        FETCH_LIST_R                                     $8      $7, 0
          3        ASSIGN                                                   !0, $8
          4        FETCH_LIST_R                                     $10     $7, 1
          5        ASSIGN                                                   !1, $10
          6        FREE                                                     $7
    3     7        ASSIGN                                                   !2, ''
    4     8        ASSIGN                                                   !3, 0
          9      > JMP                                                      ->12
    5    10    >   ASSIGN                                                   !2, 'yay'
    4    11        PRE_INC                                                  !3
         12    >   IS_SMALLER                                               !3, 1000000
         13      > JMPNZ                                                    ~16, ->10
    6    14    >   INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $17     
         17        ASSIGN                                                   !4, $17
    7    18        INIT_FCALL                                               'round'
         19        ADD                                              ~19     !5, !6
         20        SUB                                              ~20     ~19, !0
         21        SUB                                              ~21     ~20, !1
         22        MUL                                              ~22     ~21, 1000
         23        SEND_VAL                                                 ~22
         24        DO_ICALL                                         $23     
         25        ECHO                                                     $23
    9    26        INIT_FCALL                                               'microtime'
         27        DO_ICALL                                         $24     
         28        FETCH_LIST_R                                     $25     $24, 0
         29        ASSIGN                                                   !0, $25
         30        FETCH_LIST_R                                     $27     $24, 1
         31        ASSIGN                                                   !1, $27
         32        FREE                                                     $24
   10    33        ASSIGN                                                   !2, ''
   11    34        ASSIGN                                                   !3, 0
         35      > JMP                                                      ->38
   12    36    >   ASSIGN                                                   !2, 'yay'
   11    37        PRE_INC                                                  !3
         38    >   IS_SMALLER                                               !3, 1000000
         39      > JMPNZ                                                    ~33, ->36
   13    40    >   INIT_FCALL                                               'round'
         41        INIT_FCALL                                               'microtime'
         42        SEND_VAL                                                 <true>
         43        DO_ICALL                                         $34     
         44        SUB                                              ~35     $34, !4
         45        SEND_VAL                                                 ~35
         46        DO_ICALL                                         $36     
         47        ECHO                                                     $36
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.15 ms | 1404 KiB | 17 Q