3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $a = 5; $start = microtime(true); for ($j = 0; $j < 100000; $j++) { if ($a != '0') { } } $stop = microtime(true); $diff = $stop - $start; var_dump($diff); //---------------- $a = 5; $start = microtime(true); for ($i = 0; $i < 100000; $i++) { if ($a) { } } $stop = microtime(true); $diff = $stop - $start; var_dump($diff);
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 = 7
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 28
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 29
Branch analysis from position: 29
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 28
Branch analysis from position: 32
Branch analysis from position: 28
Branch analysis from position: 29
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 7
Branch analysis from position: 12
Branch analysis from position: 7
Branch analysis from position: 9
filename:       /in/jDGW1
function name:  (null)
number of ops:  42
compiled vars:  !0 = $a, !1 = $start, !2 = $j, !3 = $stop, !4 = $diff, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, 5
    6     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    8     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->10
   10     7    >   IS_NOT_EQUAL                                             !0, '0'
          8      > JMPZ                                                     ~10, ->9
    8     9    >   PRE_INC                                                  !2
         10    >   IS_SMALLER                                               !2, 100000
         11      > JMPNZ                                                    ~12, ->7
   17    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $13     
         15        ASSIGN                                                   !3, $13
   19    16        SUB                                              ~15     !3, !1
         17        ASSIGN                                                   !4, ~15
   21    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !4
         20        DO_ICALL                                                 
   25    21        ASSIGN                                                   !0, 5
   27    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !1, $19
   29    26        ASSIGN                                                   !5, 0
         27      > JMP                                                      ->30
   31    28    > > JMPZ                                                     !0, ->29
   29    29    >   PRE_INC                                                  !5
         30    >   IS_SMALLER                                               !5, 100000
         31      > JMPNZ                                                    ~23, ->28
   38    32    >   INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $24     
         35        ASSIGN                                                   !3, $24
   40    36        SUB                                              ~26     !3, !1
         37        ASSIGN                                                   !4, ~26
   42    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !4
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.09 ms | 1400 KiB | 17 Q