3v4l.org

run code in 300+ PHP versions simultaneously
<?php $productTitles = array( 'Super red Megaman T-shirt', 'Super Megaman blue T-shirt', 'Super black Megaman T-shirt', 'Super Megaman T-shirt - aquamarine', ); $productWords = explode(' ', array_pop($productTitles)); foreach ($productTitles as $productTitle) { $productWords = array_intersect($productWords, explode(' ', $productTitle)); } echo implode(' ', $productWords);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/0vlcL
function name:  (null)
number of ops:  28
compiled vars:  !0 = $productTitles, !1 = $productWords, !2 = $productTitle
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        INIT_FCALL                                               'array_pop'
          4        SEND_REF                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   11     9      > FE_RESET_R                                       $7      !0, ->21
         10    > > FE_FETCH_R                                               $7, !2, ->21
   12    11    >   INIT_FCALL                                               'array_intersect'
         12        SEND_VAR                                                 !1
         13        INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '+'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $8      
         17        SEND_VAR                                                 $8
         18        DO_ICALL                                         $9      
         19        ASSIGN                                                   !1, $9
   11    20      > JMP                                                      ->10
         21    >   FE_FREE                                                  $7
   15    22        INIT_FCALL                                               'implode'
         23        SEND_VAL                                                 '+'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                         $11     
         26        ECHO                                                     $11
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.28 ms | 1013 KiB | 17 Q