3v4l.org

run code in 300+ PHP versions simultaneously
<?php function remove_none_word_chars($string) { return preg_replace('~[^\\pL\d.,?!:;\'"/\\=\-+_%$#\(\){}\[\]<>*&^]+~u', ' ', $string); } $text = '🍓,,,.... Тестовая строка Superviser le travail de l’ensemble du personnel de production, de l’entretien et de la maintenance sur le quart de nuit en tenant compte de la convention collective;'; echo remove_none_word_chars($text);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iLiHW
function name:  (null)
number of ops:  6
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, '%F0%9F%8D%93%2C%2C%2C....+%D0%A2%D0%B5%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F+%D1%81%D1%82%D1%80%D0%BE%D0%BA%D0%B0%EF%82%A7+Superviser+le+travail+de+l%E2%80%99ensemble+du+personnel+de+production%2C+de+l%E2%80%99entretien+et+de+la+maintenance+sur+le+quart+de+nuit+en+tenant+compte+de+la+convention+collective%3B'
    9     1        INIT_FCALL                                               'remove_none_word_chars'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function remove_none_word_chars:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iLiHW
function name:  remove_none_word_chars
number of ops:  8
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%5B%5E%5CpL%5Cd.%2C%3F%21%3A%3B%27%22%2F%5C%3D%5C-%2B_%25%24%23%5C%28%5C%29%7B%7D%5C%5B%5C%5D%3C%3E%2A%26%5E%5D%2B%7Eu'
          3        SEND_VAL                                                 '+'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $1      
          6      > RETURN                                                   $1
    5     7*     > RETURN                                                   null

End of function remove_none_word_chars

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.5 ms | 1397 KiB | 16 Q