3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.06 ms | 1404 KiB | 17 Q