3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.08 ms | 1400 KiB | 17 Q