3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ "https://eksisozluk.com/merve-sanayin-pizzaciya-kapiyi-ciplak-acmasi--5868043?a=popular", "https://eksisozluk.com/merve-sanayin-pizzaciya-kapiyi-ciplak-acmasi--5868043?a=popular" ]; function filter_url(&$item) { preg_match('|(https:\/\/\w+\.\w{2,4}\/\w+-\w+)-.+|', $item, $matches); $item = $matches[1]; } array_walk($array, 'filter_url'); print_r($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1UnL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   14     1        INIT_FCALL                                                   'array_walk'
          2        SEND_REF                                                     !0
          3        SEND_VAL                                                     'filter_url'
          4        DO_ICALL                                                     
   16     5        INIT_FCALL                                                   'print_r'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Function filter_url:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V1UnL
function name:  filter_url
number of ops:  9
compiled vars:  !0 = $item, !1 = $matches
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
   10     1        INIT_FCALL                                                   'preg_match'
          2        SEND_VAL                                                     '%7C%28https%3A%5C%2F%5C%2F%5Cw%2B%5C.%5Cw%7B2%2C4%7D%5C%2F%5Cw%2B-%5Cw%2B%29-.%2B%7C'
          3        SEND_VAR                                                     !0
          4        SEND_REF                                                     !1
          5        DO_ICALL                                                     
   11     6        FETCH_DIM_R                                          ~3      !1, 1
          7        ASSIGN                                                       !0, ~3
   12     8      > RETURN                                                       null

End of function filter_url

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.38 ms | 2046 KiB | 16 Q