3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = '"¡Á É Ñ Elaskar me mandaba flores pero atña yo creía que eran de Fñariña 7!", dijo Dominique Pestaña'; function parseStopWords($text){ $text = preg_replace('/[^a-zA-Z0-9áéíóúñÁÉÍÓÚÑ¡\', ]/i','',$text); $stopwords = array('ante','bajo','cabe','con','contra','de','desde','en','entre','hacia','hasta','para','por','sin','sobre','tras','el','lo','la','los','las','un','unos','una','al','del','que','es','se','y','fue'); foreach($stopwords as $w){ $text = preg_replace('/\b'.$w.'\b/i','',$text); } $text = preg_replace('/\s{2,}/i',' ',$text); return $text; } echo parseStopWords($text); die;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/kTrbO
function name:  (null)
number of ops:  7
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%22%C2%A1%C3%81+%C3%89+%C3%91+Elaskar+me+mandaba+flores+pero+at%C3%B1a++yo+cre%C3%ADa+que+eran+de+F%C3%B1ari%C3%B1a++7%21%22%2C+dijo+Dominique+Pesta%C3%B1a'
   17     1        INIT_FCALL                                               'parsestopwords'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
   18     5      > EXIT                                                     
          6*     > RETURN                                                   1

Function parsestopwords:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/kTrbO
function name:  parseStopWords
number of ops:  28
compiled vars:  !0 = $text, !1 = $stopwords, !2 = $w
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%2F%5B%5Ea-zA-Z0-9%C3%A1%C3%A9%C3%AD%C3%B3%C3%BA%C3%B1%C3%81%C3%89%C3%8D%C3%93%C3%9A%C3%91%C2%A1%27%2C+%5D%2Fi'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
    7     7        ASSIGN                                                   !1, <array>
    9     8      > FE_RESET_R                                       $6      !1, ->19
          9    > > FE_FETCH_R                                               $6, !2, ->19
   10    10    >   INIT_FCALL                                               'preg_replace'
         11        CONCAT                                           ~7      '%2F%5Cb', !2
         12        CONCAT                                           ~8      ~7, '%5Cb%2Fi'
         13        SEND_VAL                                                 ~8
         14        SEND_VAL                                                 ''
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !0, $9
    9    18      > JMP                                                      ->9
         19    >   FE_FREE                                                  $6
   12    20        INIT_FCALL                                               'preg_replace'
         21        SEND_VAL                                                 '%2F%5Cs%7B2%2C%7D%2Fi'
         22        SEND_VAL                                                 '+'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $11     
         25        ASSIGN                                                   !0, $11
   14    26      > RETURN                                                   !0
   15    27*     > RETURN                                                   null

End of function parsestopwords

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.47 ms | 1394 KiB | 16 Q