3v4l.org

run code in 300+ PHP versions simultaneously
<?php function make_clean_url($url) { $url_word_separator = '-'; $url = preg_replace('/\R+/', ' ', $url); $url = preg_replace('/[\s.]+/', '-', $url); $url = preg_replace('/&#?[a-z0-9]+;|[^\p{Arabic}a-z0-9#-]+/ui', '', $url); $url = trim($url, " $url_word_separator"); return $url; } echo make_clean_url("اﺻﻠﯽ ﺗﺮﯾﻦ ﻓﺮق اﺳﺘﻌﺎره ﻣﺼﺮﺣﻪ و ﻣﮑﻨﯿﻪ ﭼﯿﺴﺖ؟");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hiASJ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'make_clean_url'
          1        SEND_VAL                                                 '%D8%A7%EF%BA%BB%EF%BB%A0%EF%AF%BD+%EF%BA%97%EF%BA%AE%EF%AF%BE%EF%BB%A6+%EF%BB%93%EF%BA%AE%D9%82+%D8%A7%EF%BA%B3%EF%BA%98%EF%BB%8C%EF%BA%8E%D8%B1%D9%87+%EF%BB%A3%EF%BA%BC%EF%BA%AE%EF%BA%A3%EF%BB%AA+%D9%88+%EF%BB%A3%EF%AE%91%EF%BB%A8%EF%AF%BF%EF%BB%AA+%EF%AD%BC%EF%AF%BF%EF%BA%B4%EF%BA%96%D8%9F'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function make_clean_url:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hiASJ
function name:  make_clean_url
number of ops:  29
compiled vars:  !0 = $url, !1 = $url_word_separator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, '-'
    5     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5CR%2B%2F'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        ASSIGN                                                   !0, $3
    6     8        INIT_FCALL                                               'preg_replace'
          9        SEND_VAL                                                 '%2F%5B%5Cs.%5D%2B%2F'
         10        SEND_VAL                                                 '-'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !0, $5
    7    14        INIT_FCALL                                               'preg_replace'
         15        SEND_VAL                                                 '%2F%26%23%3F%5Ba-z0-9%5D%2B%3B%7C%5B%5E%5Cp%7BArabic%7Da-z0-9%23-%5D%2B%2Fui'
         16        SEND_VAL                                                 ''
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $7      
         19        ASSIGN                                                   !0, $7
    8    20        INIT_FCALL                                               'trim'
         21        SEND_VAR                                                 !0
         22        NOP                                                      
         23        FAST_CONCAT                                      ~9      '+', !1
         24        SEND_VAL                                                 ~9
         25        DO_ICALL                                         $10     
         26        ASSIGN                                                   !0, $10
    9    27      > RETURN                                                   !0
   10    28*     > RETURN                                                   null

End of function make_clean_url

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.57 ms | 1004 KiB | 16 Q