3v4l.org

run code in 300+ PHP versions simultaneously
<?php $times = 1000*100*10; $var = null; $var = 10; $var2 = '10'; $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var == $var2) {} } $time1 = microtime(true) - $time1; echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === $var2) {} } $time2 = microtime(true) - $time2; echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; //printf("'===' was faster by %.2f percent.", $p); printf("'===' was faster"); } else { $p = (($time2-$time1)/$time1) * 100; //printf("'==' was faster by %.2f percent.", $p); printf("'==' was faster"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 10
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 30
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 46, Position 2 = 54
Branch analysis from position: 46
1 jumps found. (Code = 42) Position 1 = 61
Branch analysis from position: 61
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 30
Branch analysis from position: 35
Branch analysis from position: 30
Branch analysis from position: 32
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 10
Branch analysis from position: 15
Branch analysis from position: 10
Branch analysis from position: 12
filename:       /in/sMBMs
function name:  (null)
number of ops:  62
compiled vars:  !0 = $times, !1 = $var, !2 = $var2, !3 = $time1, !4 = $i, !5 = $time2, !6 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1000000
    5     1        ASSIGN                                                   !1, null
    6     2        ASSIGN                                                   !1, 10
    7     3        ASSIGN                                                   !2, '10'
    9     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $11     
          7        ASSIGN                                                   !3, $11
   11     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->13
   12    10    >   IS_EQUAL                                                 !1, !2
         11      > JMPZ                                                     ~14, ->12
   11    12    >   PRE_INC                                                  !4
         13    >   IS_SMALLER_OR_EQUAL                                      !4, !0
         14      > JMPNZ                                                    ~16, ->10
   15    15    >   INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $17     
         18        SUB                                              ~18     $17, !3
         19        ASSIGN                                                   !3, ~18
   17    20        ROPE_INIT                                     3  ~21     'Time+using+%27%21%27%3A+'
         21        ROPE_ADD                                      1  ~21     ~21, !3
         22        ROPE_END                                      2  ~20     ~21, '%0A'
         23        ECHO                                                     ~20
   20    24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $23     
         27        ASSIGN                                                   !5, $23
   22    28        ASSIGN                                                   !4, 0
         29      > JMP                                                      ->33
   23    30    >   IS_IDENTICAL                                             !1, !2
         31      > JMPZ                                                     ~26, ->32
   22    32    >   PRE_INC                                                  !4
         33    >   IS_SMALLER_OR_EQUAL                                      !4, !0
         34      > JMPNZ                                                    ~28, ->30
   26    35    >   INIT_FCALL                                               'microtime'
         36        SEND_VAL                                                 <true>
         37        DO_ICALL                                         $29     
         38        SUB                                              ~30     $29, !5
         39        ASSIGN                                                   !5, ~30
   28    40        ROPE_INIT                                     3  ~33     'Time+using+%27%3D%3D%3D%27%3A+'
         41        ROPE_ADD                                      1  ~33     ~33, !5
         42        ROPE_END                                      2  ~32     ~33, '%0A'
         43        ECHO                                                     ~32
   30    44        IS_SMALLER                                               !5, !3
         45      > JMPZ                                                     ~35, ->54
   31    46    >   SUB                                              ~36     !3, !5
         47        DIV                                              ~37     ~36, !5
         48        MUL                                              ~38     ~37, 100
         49        ASSIGN                                                   !6, ~38
   33    50        INIT_FCALL                                               'printf'
         51        SEND_VAL                                                 '%27%3D%3D%3D%27+was+faster'
         52        DO_ICALL                                                 
         53      > JMP                                                      ->61
   35    54    >   SUB                                              ~41     !5, !3
         55        DIV                                              ~42     ~41, !3
         56        MUL                                              ~43     ~42, 100
         57        ASSIGN                                                   !6, ~43
   37    58        INIT_FCALL                                               'printf'
         59        SEND_VAL                                                 '%27%3D%3D%27+was+faster'
         60        DO_ICALL                                                 
   38    61    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.49 ms | 1400 KiB | 17 Q