3v4l.org

run code in 500+ PHP versions simultaneously
<?php $vocabolario = array("La", "mia", "una", "prova", "con", "del", "testo"); function wordCheck($word) { global $vocabolario; $word = $word[0]; if (in_array($word, $vocabolario)) { return $word; } return '<u>'.$word.'</u>'; } function textCheck($text) { return preg_replace_callback('#(?!<.*?)\w+(?![^<>]*?>)#','wordCheck', $text); } echo textCheck("La mia รจ una provaa con del testo: <a href='http://pippo.it'>html</a>.");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vgZOC
function name:  (null)
number of ops:  6
compiled vars:  !0 = $vocabolario
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   20     1        INIT_FCALL                                                   'textcheck'
          2        SEND_VAL                                                     'La+mia+%C3%A8+una+provaa+con+del+testo%3A+%3Ca+href%3D%27http%3A%2F%2Fpippo.it%27%3Ehtml%3C%2Fa%3E.'
          3        DO_FCALL                                          0  $2      
          4        ECHO                                                         $2
          5      > RETURN                                                       1

Function wordcheck:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 7
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vgZOC
function name:  wordCheck
number of ops:  11
compiled vars:  !0 = $word, !1 = $vocabolario
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
    6     1        BIND_GLOBAL                                                  !1, 'vocabolario'
    7     2        FETCH_DIM_R                                          ~2      !0, 0
          3        ASSIGN                                                       !0, ~2
    9     4        FRAMELESS_ICALL_2                in_array            ~4      !0, !1
          5      > JMPZ                                                         ~4, ->7
   10     6    > > RETURN                                                       !0
   13     7    >   CONCAT                                               ~5      '%3Cu%3E', !0
          8        CONCAT                                               ~6      ~5, '%3C%2Fu%3E'
          9      > RETURN                                                       ~6
   14    10*     > RETURN                                                       null

End of function wordcheck

Function textcheck:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vgZOC
function name:  textCheck
number of ops:  8
compiled vars:  !0 = $text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   RECV                                                 !0      
   17     1        INIT_FCALL                                                   'preg_replace_callback'
          2        SEND_VAL                                                     '%23%28%3F%21%3C.%2A%3F%29%5Cw%2B%28%3F%21%5B%5E%3C%3E%5D%2A%3F%3E%29%23'
          3        SEND_VAL                                                     'wordCheck'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $1      
          6      > RETURN                                                       $1
   18     7*     > RETURN                                                       null

End of function textcheck

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
205.12 ms | 3307 KiB | 16 Q