3v4l.org

run code in 300+ PHP versions simultaneously
<?php const REPEATS = 1000000; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(true){ if(true){ } } } $end = microtime(true); echo "\nif true if true: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(false){ if(true){ } } } $end = microtime(true); echo "\nif false if true: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(true){ if(false){ } } } $end = microtime(true); echo "\nif true if false: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(false){ if(false){ } } } $end = microtime(true); echo "\nif false if false: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(true and true){ } } $end = microtime(true); echo "\nif true and true: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(false and true){ } } $end = microtime(true); echo "\nif false and true: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(true and false){ } } $end = microtime(true); echo "\nif true and false: " . ($end - $start) / REPEATS; $start = microtime(true); for($i = 0; $i < REPEATS; $i++){ if(false and false){ } } $end = microtime(true); echo "\nif false and false: " . ($end - $start) / REPEATS;
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 = 13, Position 2 = 7
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 28
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 49
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 70
Branch analysis from position: 76
1 jumps found. (Code = 42) Position 1 = 93
Branch analysis from position: 93
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 91
Branch analysis from position: 96
1 jumps found. (Code = 42) Position 1 = 113
Branch analysis from position: 113
2 jumps found. (Code = 44) Position 1 = 116, Position 2 = 111
Branch analysis from position: 116
1 jumps found. (Code = 42) Position 1 = 133
Branch analysis from position: 133
2 jumps found. (Code = 44) Position 1 = 136, Position 2 = 131
Branch analysis from position: 136
1 jumps found. (Code = 42) Position 1 = 153
Branch analysis from position: 153
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 151
Branch analysis from position: 156
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 151
2 jumps found. (Code = 43) Position 1 = 152, Position 2 = 152
Branch analysis from position: 152
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 151
Branch analysis from position: 156
Branch analysis from position: 151
Branch analysis from position: 152
Branch analysis from position: 131
2 jumps found. (Code = 43) Position 1 = 132, Position 2 = 132
Branch analysis from position: 132
2 jumps found. (Code = 44) Position 1 = 136, Position 2 = 131
Branch analysis from position: 136
Branch analysis from position: 131
Branch analysis from position: 132
Branch analysis from position: 111
2 jumps found. (Code = 43) Position 1 = 112, Position 2 = 112
Branch analysis from position: 112
2 jumps found. (Code = 44) Position 1 = 116, Position 2 = 111
Branch analysis from position: 116
Branch analysis from position: 111
Branch analysis from position: 112
Branch analysis from position: 91
2 jumps found. (Code = 43) Position 1 = 92, Position 2 = 92
Branch analysis from position: 92
2 jumps found. (Code = 44) Position 1 = 96, Position 2 = 91
Branch analysis from position: 96
Branch analysis from position: 91
Branch analysis from position: 92
Branch analysis from position: 70
2 jumps found. (Code = 43) Position 1 = 71, Position 2 = 72
Branch analysis from position: 71
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 76, Position 2 = 70
Branch analysis from position: 76
Branch analysis from position: 70
Branch analysis from position: 72
Branch analysis from position: 72
Branch analysis from position: 49
2 jumps found. (Code = 43) Position 1 = 50, Position 2 = 51
Branch analysis from position: 50
2 jumps found. (Code = 43) Position 1 = 51, Position 2 = 51
Branch analysis from position: 51
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 49
Branch analysis from position: 55
Branch analysis from position: 49
Branch analysis from position: 51
Branch analysis from position: 51
Branch analysis from position: 28
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 30
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 34, Position 2 = 28
Branch analysis from position: 34
Branch analysis from position: 28
Branch analysis from position: 30
Branch analysis from position: 30
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 7
Branch analysis from position: 13
Branch analysis from position: 7
Branch analysis from position: 9
Branch analysis from position: 9
filename:       /in/MGUXF
function name:  (null)
number of ops:  166
compiled vars:  !0 = $start, !1 = $i, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'REPEATS', 1000000
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    6     5        ASSIGN                                                   !1, 0
          6      > JMP                                                      ->10
    7     7    > > JMPZ                                                     <true>, ->9
    8     8    > > JMPZ                                                     <true>, ->9
    6     9    >   PRE_INC                                                  !1
         10    >   FETCH_CONSTANT                                   ~7      'REPEATS'
         11        IS_SMALLER                                               !1, ~7
         12      > JMPNZ                                                    ~8, ->7
   13    13    >   INIT_FCALL                                               'microtime'
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $9      
         16        ASSIGN                                                   !2, $9
   14    17        SUB                                              ~11     !2, !0
         18        FETCH_CONSTANT                                   ~12     'REPEATS'
         19        DIV                                              ~13     ~11, ~12
         20        CONCAT                                           ~14     '%0Aif+true+if+true%3A+', ~13
         21        ECHO                                                     ~14
   15    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $15     
         25        ASSIGN                                                   !0, $15
   16    26        ASSIGN                                                   !1, 0
         27      > JMP                                                      ->31
   17    28    > > JMPZ                                                     <false>, ->30
   18    29    > > JMPZ                                                     <true>, ->30
   16    30    >   PRE_INC                                                  !1
         31    >   FETCH_CONSTANT                                   ~19     'REPEATS'
         32        IS_SMALLER                                               !1, ~19
         33      > JMPNZ                                                    ~20, ->28
   23    34    >   INIT_FCALL                                               'microtime'
         35        SEND_VAL                                                 <true>
         36        DO_ICALL                                         $21     
         37        ASSIGN                                                   !2, $21
   24    38        SUB                                              ~23     !2, !0
         39        FETCH_CONSTANT                                   ~24     'REPEATS'
         40        DIV                                              ~25     ~23, ~24
         41        CONCAT                                           ~26     '%0Aif+false+if+true%3A+', ~25
         42        ECHO                                                     ~26
   25    43        INIT_FCALL                                               'microtime'
         44        SEND_VAL                                                 <true>
         45        DO_ICALL                                         $27     
         46        ASSIGN                                                   !0, $27
   26    47        ASSIGN                                                   !1, 0
         48      > JMP                                                      ->52
   27    49    > > JMPZ                                                     <true>, ->51
   28    50    > > JMPZ                                                     <false>, ->51
   26    51    >   PRE_INC                                                  !1
         52    >   FETCH_CONSTANT                                   ~31     'REPEATS'
         53        IS_SMALLER                                               !1, ~31
         54      > JMPNZ                                                    ~32, ->49
   33    55    >   INIT_FCALL                                               'microtime'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                         $33     
         58        ASSIGN                                                   !2, $33
   34    59        SUB                                              ~35     !2, !0
         60        FETCH_CONSTANT                                   ~36     'REPEATS'
         61        DIV                                              ~37     ~35, ~36
         62        CONCAT                                           ~38     '%0Aif+true+if+false%3A+', ~37
         63        ECHO                                                     ~38
   35    64        INIT_FCALL                                               'microtime'
         65        SEND_VAL                                                 <true>
         66        DO_ICALL                                         $39     
         67        ASSIGN                                                   !0, $39
   36    68        ASSIGN                                                   !1, 0
         69      > JMP                                                      ->73
   37    70    > > JMPZ                                                     <false>, ->72
   38    71    > > JMPZ                                                     <false>, ->72
   36    72    >   PRE_INC                                                  !1
         73    >   FETCH_CONSTANT                                   ~43     'REPEATS'
         74        IS_SMALLER                                               !1, ~43
         75      > JMPNZ                                                    ~44, ->70
   43    76    >   INIT_FCALL                                               'microtime'
         77        SEND_VAL                                                 <true>
         78        DO_ICALL                                         $45     
         79        ASSIGN                                                   !2, $45
   44    80        SUB                                              ~47     !2, !0
         81        FETCH_CONSTANT                                   ~48     'REPEATS'
         82        DIV                                              ~49     ~47, ~48
         83        CONCAT                                           ~50     '%0Aif+false+if+false%3A+', ~49
         84        ECHO                                                     ~50
   46    85        INIT_FCALL                                               'microtime'
         86        SEND_VAL                                                 <true>
         87        DO_ICALL                                         $51     
         88        ASSIGN                                                   !0, $51
   47    89        ASSIGN                                                   !1, 0
         90      > JMP                                                      ->93
   48    91    > > JMPZ                                                     <true>, ->92
   47    92    >   PRE_INC                                                  !1
         93    >   FETCH_CONSTANT                                   ~55     'REPEATS'
         94        IS_SMALLER                                               !1, ~55
         95      > JMPNZ                                                    ~56, ->91
   52    96    >   INIT_FCALL                                               'microtime'
         97        SEND_VAL                                                 <true>
         98        DO_ICALL                                         $57     
         99        ASSIGN                                                   !2, $57
   53   100        SUB                                              ~59     !2, !0
        101        FETCH_CONSTANT                                   ~60     'REPEATS'
        102        DIV                                              ~61     ~59, ~60
        103        CONCAT                                           ~62     '%0Aif+true+and+true%3A+', ~61
        104        ECHO                                                     ~62
   54   105        INIT_FCALL                                               'microtime'
        106        SEND_VAL                                                 <true>
        107        DO_ICALL                                         $63     
        108        ASSIGN                                                   !0, $63
   55   109        ASSIGN                                                   !1, 0
        110      > JMP                                                      ->113
   56   111    > > JMPZ                                                     <false>, ->112
   55   112    >   PRE_INC                                                  !1
        113    >   FETCH_CONSTANT                                   ~67     'REPEATS'
        114        IS_SMALLER                                               !1, ~67
        115      > JMPNZ                                                    ~68, ->111
   60   116    >   INIT_FCALL                                               'microtime'
        117        SEND_VAL                                                 <true>
        118        DO_ICALL                                         $69     
        119        ASSIGN                                                   !2, $69
   61   120        SUB                                              ~71     !2, !0
        121        FETCH_CONSTANT                                   ~72     'REPEATS'
        122        DIV                                              ~73     ~71, ~72
        123        CONCAT                                           ~74     '%0Aif+false+and+true%3A+', ~73
        124        ECHO                                                     ~74
   62   125        INIT_FCALL                                               'microtime'
        126        SEND_VAL                                                 <true>
        127        DO_ICALL                                         $75     
        128        ASSIGN                                                   !0, $75
   63   129        ASSIGN                                                   !1, 0
        130      > JMP                                                      ->133
   64   131    > > JMPZ                                                     <false>, ->132
   63   132    >   PRE_INC                                                  !1
        133    >   FETCH_CONSTANT                                   ~79     'REPEATS'
        134        IS_SMALLER                                               !1, ~79
        135      > JMPNZ                                                    ~80, ->131
   68   136    >   INIT_FCALL                                               'microtime'
        137        SEND_VAL                                                 <true>
        138        DO_ICALL                                         $81     
        139        ASSIGN                                                   !2, $81
   69   140        SUB                                              ~83     !2, !0
        141        FETCH_CONSTANT                                   ~84     'REPEATS'
        142        DIV                                              ~85     ~83, ~84
        143        CONCAT                                           ~86     '%0Aif+true+and+false%3A+', ~85
        144        ECHO                                                     ~86
   70   145        INIT_FCALL                                               'microtime'
        146        SEND_VAL                                                 <true>
        147        DO_ICALL                                         $87     
        148        ASSIGN                                                   !0, $87
   71   149        ASSIGN                                                   !1, 0
        150      > JMP                                                      ->153
   72   151    > > JMPZ                                                     <false>, ->152
   71   152    >   PRE_INC                                                  !1
        153    >   FETCH_CONSTANT                                   ~91     'REPEATS'
        154        IS_SMALLER                                               !1, ~91
        155      > JMPNZ                                                    ~92, ->151
   76   156    >   INIT_FCALL                                               'microtime'
        157        SEND_VAL                                                 <true>
        158        DO_ICALL                                         $93     
        159        ASSIGN                                                   !2, $93
   77   160        SUB                                              ~95     !2, !0
        161        FETCH_CONSTANT                                   ~96     'REPEATS'
        162        DIV                                              ~97     ~95, ~96
        163        CONCAT                                           ~98     '%0Aif+false+and+false%3A+', ~97
        164        ECHO                                                     ~98
        165      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.55 ms | 1412 KiB | 15 Q