3v4l.org

run code in 300+ PHP versions simultaneously
<?php $words = ["apple", "sample", "app", "тоҷик", "отабек", "баҳодурбек"]; $letters = ['l', 's']; $res = preg_grep("/[" . implode("", $letters) . "]/", $words); var_dump($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UZTYZ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $words, !1 = $letters, !2 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, <array>
    6     2        INIT_FCALL                                               'preg_grep'
          3        INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 ''
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $5      
          7        CONCAT                                           ~6      '%2F%5B', $5
          8        CONCAT                                           ~7      ~6, '%5D%2F'
          9        SEND_VAL                                                 ~7
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
    7    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.27 ms | 999 KiB | 16 Q