3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tag_merge_count = 50000; $a = []; $b = ['foo', 'bar', 'baz']; $c = ['llamas', 'are', 'awesome']; $iterations = $tag_merge_count/4; for ($i = 0; $i < $iterations; $i++) { array_unique(array_merge($a, $b)); // empty + non-empty array_unique(array_merge($b, $a)); // non-empty + empty array_unique(array_merge($b, $b)); // non-empty + non-empty, with 100% collision array_unique(array_merge($b, $c)); // non-empty + non-empty, with 0% collision }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 8
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 8
Branch analysis from position: 39
Branch analysis from position: 8
filename:       /in/X97m4
function name:  (null)
number of ops:  40
compiled vars:  !0 = $tag_merge_count, !1 = $a, !2 = $b, !3 = $c, !4 = $iterations, !5 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 50000
    5     1        ASSIGN                                                       !1, <array>
    6     2        ASSIGN                                                       !2, <array>
    7     3        ASSIGN                                                       !3, <array>
    9     4        DIV                                                  ~10     !0, 4
          5        ASSIGN                                                       !4, ~10
   10     6        ASSIGN                                                       !5, 0
          7      > JMP                                                          ->37
   11     8    >   INIT_FCALL                                                   'array_unique'
          9        INIT_FCALL                                                   'array_merge'
         10        SEND_VAR                                                     !1
         11        SEND_VAR                                                     !2
         12        DO_ICALL                                             $13     
         13        SEND_VAR                                                     $13
         14        DO_ICALL                                                     
   12    15        INIT_FCALL                                                   'array_unique'
         16        INIT_FCALL                                                   'array_merge'
         17        SEND_VAR                                                     !2
         18        SEND_VAR                                                     !1
         19        DO_ICALL                                             $15     
         20        SEND_VAR                                                     $15
         21        DO_ICALL                                                     
   13    22        INIT_FCALL                                                   'array_unique'
         23        INIT_FCALL                                                   'array_merge'
         24        SEND_VAR                                                     !2
         25        SEND_VAR                                                     !2
         26        DO_ICALL                                             $17     
         27        SEND_VAR                                                     $17
         28        DO_ICALL                                                     
   14    29        INIT_FCALL                                                   'array_unique'
         30        INIT_FCALL                                                   'array_merge'
         31        SEND_VAR                                                     !2
         32        SEND_VAR                                                     !3
         33        DO_ICALL                                             $19     
         34        SEND_VAR                                                     $19
         35        DO_ICALL                                                     
   10    36        PRE_INC                                                      !5
         37    >   IS_SMALLER                                                   !5, !4
         38      > JMPNZ                                                        ~22, ->8
   15    39    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.35 ms | 2221 KiB | 15 Q