3v4l.org

run code in 500+ 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:  14
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        FRAMELESS_ICALL_2                implode             ~5      '', !1
          4        CONCAT                                               ~6      '%2F%5B', ~5
          5        CONCAT                                               ~7      ~6, '%5D%2F'
          6        SEND_VAL                                                     ~7
          7        SEND_VAR                                                     !0
          8        DO_ICALL                                             $8      
          9        ASSIGN                                                       !2, $8
    7    10        INIT_FCALL                                                   'var_dump'
         11        SEND_VAR                                                     !2
         12        DO_ICALL                                                     
         13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.61 ms | 2630 KiB | 15 Q