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 = key($cache); $file = reset($cache); } $endEach = microtime(true); $listDiff = $endList - $startList; $eachDiff = $endEach - $startEach; echo 'List diff: ' . $listDiff . PHP_EOL; echo 'Each diff: ' . $eachDiff . PHP_EOL;
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 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 26
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 26
Branch analysis from position: 37
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/JvtOk
function name:  (null)
number of ops:  52
compiled vars:  !0 = $cache, !1 = $startList, !2 = $i, !3 = $class, !4 = $file, !5 = $endList, !6 = $startEach, !7 = $endEach, !8 = $listDiff, !9 = $eachDiff
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                                         $11     
          4        ASSIGN                                                   !1, $11
    6     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->14
    7     7    >   QM_ASSIGN                                        ~14     !0
          8        FETCH_LIST_R                                     $15     ~14, 0
          9        ASSIGN                                                   !3, $15
         10        FETCH_LIST_R                                     $17     ~14, 1
         11        ASSIGN                                                   !4, $17
         12        FREE                                                     ~14
    6    13        PRE_INC                                                  !2
         14    >   IS_SMALLER                                               !2, 1000
         15      > JMPNZ                                                    ~20, ->7
    9    16    >   INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $21     
         19        ASSIGN                                                   !5, $21
   11    20        INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $23     
         23        ASSIGN                                                   !6, $23
   12    24        ASSIGN                                                   !2, 0
         25      > JMP                                                      ->35
   13    26    >   INIT_FCALL                                               'key'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $26     
         29        ASSIGN                                                   !3, $26
   14    30        INIT_FCALL                                               'reset'
         31        SEND_REF                                                 !0
         32        DO_ICALL                                         $28     
         33        ASSIGN                                                   !4, $28
   12    34        PRE_INC                                                  !2
         35    >   IS_SMALLER                                               !2, 1000
         36      > JMPNZ                                                    ~31, ->26
   16    37    >   INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $32     
         40        ASSIGN                                                   !7, $32
   18    41        SUB                                              ~34     !5, !1
         42        ASSIGN                                                   !8, ~34
   19    43        SUB                                              ~36     !7, !6
         44        ASSIGN                                                   !9, ~36
   20    45        CONCAT                                           ~38     'List+diff%3A+', !8
         46        CONCAT                                           ~39     ~38, '%0A'
         47        ECHO                                                     ~39
   21    48        CONCAT                                           ~40     'Each+diff%3A+', !9
         49        CONCAT                                           ~41     ~40, '%0A'
         50        ECHO                                                     ~41
         51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.6 ms | 1400 KiB | 19 Q