3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Samsung UN32EH4003 32-inch 720p 60Hz LED HDTV (Black)'; $arr=array(); preg_match_all('/\b([0-9A-Za-z]{3,})\b/i', $string, $arr); $keywords = array_slice(array_unique($arr[0]),0,3); echo implode(' ', $keywords);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lr8du
function name:  (null)
number of ops:  23
compiled vars:  !0 = $string, !1 = $arr, !2 = $keywords
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Samsung+UN32EH4003+32-inch+720p+60Hz+LED+HDTV+%28Black%29'
    4     1        ASSIGN                                                   !1, <array>
    5     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%5Cb%28%5B0-9A-Za-z%5D%7B3%2C%7D%29%5Cb%2Fi'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
    6     7        INIT_FCALL                                               'array_slice'
          8        INIT_FCALL                                               'array_unique'
          9        FETCH_DIM_R                                      ~6      !1, 0
         10        SEND_VAL                                                 ~6
         11        DO_ICALL                                         $7      
         12        SEND_VAR                                                 $7
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 3
         15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !2, $8
    7    17        INIT_FCALL                                               'implode'
         18        SEND_VAL                                                 '+'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $10     
         21        ECHO                                                     $10
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.2 ms | 1386 KiB | 21 Q