3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text= "#h #gg #مصر"; $get_hash = preg_match_all("/(^|\s)#(\w*[a-zA-Z-أ-إ-آ-ا-ب-ت-ث-ج-ح-خ-د-ذ-ر-ز-س-ش-ص-ض-ط-ظ-ع-غ-ف-ق-ك-ل-م-ن-ه-و-لا-لا-لآ-لأ-لإ-ى-ي-ئ-ة-ء-ؤ_]+\w*)/", $text, $matches); $array_hash = implode("",$matches[0]).""; $hash = str_replace('#', ', ', $array_hash); echo "hash (".$hash.")<br />"; echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0DNvH
function name:  (null)
number of ops:  25
compiled vars:  !0 = $text, !1 = $get_hash, !2 = $matches, !3 = $array_hash, !4 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%23h+%23gg+%23%D9%85%D8%B5%D8%B1'
    4     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%28%5E%7C%5Cs%29%23%28%5Cw%2A%5Ba-zA-Z-%D8%A3-%D8%A5-%D8%A2-%D8%A7-%D8%A8-%D8%AA-%D8%AB-%D8%AC-%D8%AD-%D8%AE-%D8%AF-%D8%B0-%D8%B1-%D8%B2-%D8%B3-%D8%B4-%D8%B5-%D8%B6-%D8%B7-%D8%B8-%D8%B9-%D8%BA-%D9%81-%D9%82-%D9%83-%D9%84-%D9%85-%D9%86-%D9%87-%D9%88-%D9%84%D8%A7-%D9%84%D8%A7-%D9%84%D8%A2-%D9%84%D8%A3-%D9%84%D8%A5-%D9%89-%D9%8A-%D8%A6-%D8%A9-%D8%A1-%D8%A4_%5D%2B%5Cw%2A%29%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !1, $6
    5     7        INIT_FCALL                                               'implode'
          8        SEND_VAL                                                 ''
          9        FETCH_DIM_R                                      ~8      !2, 0
         10        SEND_VAL                                                 ~8
         11        DO_ICALL                                         $9      
         12        CONCAT                                           ~10     $9, ''
         13        ASSIGN                                                   !3, ~10
    6    14        INIT_FCALL                                               'str_replace'
         15        SEND_VAL                                                 '%23'
         16        SEND_VAL                                                 '%2C+'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !4, $12
    7    20        CONCAT                                           ~14     'hash+%28', !4
         21        CONCAT                                           ~15     ~14, '%29%3Cbr+%2F%3E'
         22        ECHO                                                     ~15
    8    23        ECHO                                                     !0
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.53 ms | 1395 KiB | 19 Q