3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 1; $b = 2; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { list($a, $b) = [$b, $a]; } echo microtime(true) - $time . PHP_EOL; $time = microtime(true); for ($i = 0; $i < 1000000; $i++) { $t = $a; $a = $b; $b = $t; } echo microtime(true) - $time . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 30
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 30
Branch analysis from position: 36
Branch analysis from position: 30
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 8
Branch analysis from position: 18
Branch analysis from position: 8
filename:       /in/MUfKQ
function name:  (null)
number of ops:  43
compiled vars:  !0 = $a, !1 = $b, !2 = $time, !3 = $i, !4 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ASSIGN                                                   !1, 2
    6     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    7     6        ASSIGN                                                   !3, 0
          7      > JMP                                                      ->16
    8     8    >   INIT_ARRAY                                       ~10     !1
          9        ADD_ARRAY_ELEMENT                                ~10     !0
         10        FETCH_LIST_R                                     $11     ~10, 0
         11        ASSIGN                                                   !0, $11
         12        FETCH_LIST_R                                     $13     ~10, 1
         13        ASSIGN                                                   !1, $13
         14        FREE                                                     ~10
    7    15        PRE_INC                                                  !3
         16    >   IS_SMALLER                                               !3, 1000000
         17      > JMPNZ                                                    ~16, ->8
   10    18    >   INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $17     
         21        SUB                                              ~18     $17, !2
         22        CONCAT                                           ~19     ~18, '%0A'
         23        ECHO                                                     ~19
   12    24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $20     
         27        ASSIGN                                                   !2, $20
   13    28        ASSIGN                                                   !3, 0
         29      > JMP                                                      ->34
   14    30    >   ASSIGN                                                   !4, !0
         31        ASSIGN                                                   !0, !1
         32        ASSIGN                                                   !1, !4
   13    33        PRE_INC                                                  !3
         34    >   IS_SMALLER                                               !3, 1000000
         35      > JMPNZ                                                    ~27, ->30
   16    36    >   INIT_FCALL                                               'microtime'
         37        SEND_VAL                                                 <true>
         38        DO_ICALL                                         $28     
         39        SUB                                              ~29     $28, !2
         40        CONCAT                                           ~30     ~29, '%0A'
         41        ECHO                                                     ~30
         42      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.34 ms | 1456 KiB | 14 Q