3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); $iterations = 1000000; $start = microtime(true); for ($i=0; $i<$iterations; $i++) { $page = @$_GET['page'] ?: 'home'; } $suppressedTime = round(microtime(true) - $start, 8); $start = microtime(true); for ($i=0; $i<$iterations; $i++) { $page = isset($_GET['page']) ? $_GET['page'] : 'home'; } $issetTime = round(microtime(true) - $start, 8); echo "suppressed time: {$suppressedTime}\n"; echo "isset time: {$issetTime}\n\n"; echo "speed difference: " . round(100 / $suppressedTime * $issetTime, 2) . "%";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 35
Branch analysis from position: 47
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 42
Branch analysis from position: 38
1 jumps found. (Code = 42) Position 1 = 43
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 35
Branch analysis from position: 47
Branch analysis from position: 35
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 35
Branch analysis from position: 47
Branch analysis from position: 35
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 10
Branch analysis from position: 20
Branch analysis from position: 10
filename:       /in/c6q3a
function name:  (null)
number of ops:  74
compiled vars:  !0 = $iterations, !1 = $start, !2 = $i, !3 = $page, !4 = $suppressedTime, !5 = $issetTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
    5     3        ASSIGN                                                   !0, 1000000
    6     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !1, $8
    8     8        ASSIGN                                                   !2, 0
          9      > JMP                                                      ->18
    9    10    >   BEGIN_SILENCE                                    ~11     
         11        FETCH_R                      global              ~12     '_GET'
         12        FETCH_DIM_R                                      ~13     ~12, 'page'
         13        END_SILENCE                                              ~11
         14        JMP_SET                                          ~14     ~13, ->16
         15        QM_ASSIGN                                        ~14     'home'
         16        ASSIGN                                                   !3, ~14
    8    17        PRE_INC                                                  !2
         18    >   IS_SMALLER                                               !2, !0
         19      > JMPNZ                                                    ~17, ->10
   12    20    >   INIT_FCALL                                               'round'
         21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $18     
         24        SUB                                              ~19     $18, !1
         25        SEND_VAL                                                 ~19
         26        SEND_VAL                                                 8
         27        DO_ICALL                                         $20     
         28        ASSIGN                                                   !4, $20
   14    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $22     
         32        ASSIGN                                                   !1, $22
   16    33        ASSIGN                                                   !2, 0
         34      > JMP                                                      ->45
   17    35    >   FETCH_IS                                         ~25     '_GET'
         36        ISSET_ISEMPTY_DIM_OBJ                         0          ~25, 'page'
         37      > JMPZ                                                     ~26, ->42
         38    >   FETCH_R                      global              ~27     '_GET'
         39        FETCH_DIM_R                                      ~28     ~27, 'page'
         40        QM_ASSIGN                                        ~29     ~28
         41      > JMP                                                      ->43
         42    >   QM_ASSIGN                                        ~29     'home'
         43    >   ASSIGN                                                   !3, ~29
   16    44        PRE_INC                                                  !2
         45    >   IS_SMALLER                                               !2, !0
         46      > JMPNZ                                                    ~32, ->35
   20    47    >   INIT_FCALL                                               'round'
         48        INIT_FCALL                                               'microtime'
         49        SEND_VAL                                                 <true>
         50        DO_ICALL                                         $33     
         51        SUB                                              ~34     $33, !1
         52        SEND_VAL                                                 ~34
         53        SEND_VAL                                                 8
         54        DO_ICALL                                         $35     
         55        ASSIGN                                                   !5, $35
   23    56        ROPE_INIT                                     3  ~38     'suppressed+time%3A+'
         57        ROPE_ADD                                      1  ~38     ~38, !4
         58        ROPE_END                                      2  ~37     ~38, '%0A'
         59        ECHO                                                     ~37
   24    60        ROPE_INIT                                     3  ~41     'isset+time%3A+'
         61        ROPE_ADD                                      1  ~41     ~41, !5
         62        ROPE_END                                      2  ~40     ~41, '%0A%0A'
         63        ECHO                                                     ~40
   25    64        INIT_FCALL                                               'round'
         65        DIV                                              ~43     100, !4
         66        MUL                                              ~44     !5, ~43
         67        SEND_VAL                                                 ~44
         68        SEND_VAL                                                 2
         69        DO_ICALL                                         $45     
         70        CONCAT                                           ~46     'speed+difference%3A+', $45
         71        CONCAT                                           ~47     ~46, '%25'
         72        ECHO                                                     ~47
         73      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.12 ms | 1392 KiB | 19 Q