3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cache = array('Blah\Blah\Blah', 'src/Blah/Blah/Blag.php'); $startList = microtime(true); for ($i = 0; $i < 1000; $i++) { list($class, $file) = $cache; } $endList = microtime(true); $startEach = microtime(true); for ($i = 0; $i < 1000; $i++) { $class = $cache[0]; $file = $cache[1]; } $endEach = microtime(true); $startAr = microtime(true); for ($i = 0; $i < 1000; $i++) { $class = reset($cache); $file = end($cache); } $endAr = microtime(true); $listDiff = $endList - $startList; $eachDiff = $endEach - $startEach; $arDiff = $endAr - $startAr; echo 'List diff: ' . $listDiff . "\n"; echo 'Each diff: ' . $eachDiff . "\n"; echo 'Ar diff: ' . $arDiff . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 26
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 43
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 54, Position 2 = 43
Branch analysis from position: 54
Branch analysis from position: 43
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 26
Branch analysis from position: 33
Branch analysis from position: 26
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
Branch analysis from position: 7
filename:       /in/hgdjT
function name:  (null)
number of ops:  74
compiled vars:  !0 = $cache, !1 = $startList, !2 = $i, !3 = $class, !4 = $file, !5 = $endList, !6 = $startEach, !7 = $endEach, !8 = $startAr, !9 = $endAr, !10 = $listDiff, !11 = $eachDiff, !12 = $arDiff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $14     
          4        ASSIGN                                                   !1, $14
    6     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->14
    7     7    >   QM_ASSIGN                                        ~17     !0
          8        FETCH_LIST_R                                     $18     ~17, 0
          9        ASSIGN                                                   !3, $18
         10        FETCH_LIST_R                                     $20     ~17, 1
         11        ASSIGN                                                   !4, $20
         12        FREE                                                     ~17
    6    13        PRE_INC                                                  !2
         14    >   IS_SMALLER                                               !2, 1000
         15      > JMPNZ                                                    ~23, ->7
    9    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $24     
         19        ASSIGN                                                   !5, $24
   11    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $26     
         23        ASSIGN                                                   !6, $26
   12    24        ASSIGN                                                   !2, 0
         25      > JMP                                                      ->31
   13    26    >   FETCH_DIM_R                                      ~29     !0, 0
         27        ASSIGN                                                   !3, ~29
   14    28        FETCH_DIM_R                                      ~31     !0, 1
         29        ASSIGN                                                   !4, ~31
   12    30        PRE_INC                                                  !2
         31    >   IS_SMALLER                                               !2, 1000
         32      > JMPNZ                                                    ~34, ->26
   16    33    >   INIT_FCALL                                               'microtime'
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $35     
         36        ASSIGN                                                   !7, $35
   18    37        INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $37     
         40        ASSIGN                                                   !8, $37
   19    41        ASSIGN                                                   !2, 0
         42      > JMP                                                      ->52
   20    43    >   INIT_FCALL                                               'reset'
         44        SEND_REF                                                 !0
         45        DO_ICALL                                         $40     
         46        ASSIGN                                                   !3, $40
   21    47        INIT_FCALL                                               'end'
         48        SEND_REF                                                 !0
         49        DO_ICALL                                         $42     
         50        ASSIGN                                                   !4, $42
   19    51        PRE_INC                                                  !2
         52    >   IS_SMALLER                                               !2, 1000
         53      > JMPNZ                                                    ~45, ->43
   23    54    >   INIT_FCALL                                               'microtime'
         55        SEND_VAL                                                 <true>
         56        DO_ICALL                                         $46     
         57        ASSIGN                                                   !9, $46
   25    58        SUB                                              ~48     !5, !1
         59        ASSIGN                                                   !10, ~48
   26    60        SUB                                              ~50     !7, !6
         61        ASSIGN                                                   !11, ~50
   27    62        SUB                                              ~52     !9, !8
         63        ASSIGN                                                   !12, ~52
   28    64        CONCAT                                           ~54     'List+diff%3A+', !10
         65        CONCAT                                           ~55     ~54, '%0A'
         66        ECHO                                                     ~55
   29    67        CONCAT                                           ~56     'Each+diff%3A+', !11
         68        CONCAT                                           ~57     ~56, '%0A'
         69        ECHO                                                     ~57
   30    70        CONCAT                                           ~58     'Ar+diff%3A+', !12
         71        CONCAT                                           ~59     ~58, '%0A'
         72        ECHO                                                     ~59
         73      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.79 ms | 1405 KiB | 19 Q