3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cleaner($url) { $U = explode(' ',$url); $W =array(); foreach ($U as $k => $u) { if (stristr($u,'http') || (count(explode('.',$u)) > 1)) { unset($U[$k]); return cleaner( implode(' ',$U)); } } return implode(' ',$U); } $url = "Here is another funny site lucasg@google.com"; echo "Cleaned: " . cleaner($url);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2t1E7
function name:  (null)
number of ops:  7
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, 'Here+is+another+funny+site+lucasg%40google.com'
   17     1        INIT_FCALL                                               'cleaner'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        CONCAT                                           ~3      'Cleaned%3A+', $2
          5        ECHO                                                     ~3
          6      > RETURN                                                   1

Function cleaner:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 34
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 34
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 33
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 22
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/2t1E7
function name:  cleaner
number of ops:  41
compiled vars:  !0 = $url, !1 = $U, !2 = $W, !3 = $u, !4 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6        ASSIGN                                                   !2, <array>
    7     7      > FE_RESET_R                                       $8      !1, ->34
          8    > > FE_FETCH_R                                       ~9      $8, !3, ->34
          9    >   ASSIGN                                                   !4, ~9
    8    10        INIT_FCALL                                               'stristr'
         11        SEND_VAR                                                 !3
         12        SEND_VAL                                                 'http'
         13        DO_ICALL                                         $11     
         14      > JMPNZ_EX                                         ~12     $11, ->22
         15    >   INIT_FCALL                                               'explode'
         16        SEND_VAL                                                 '.'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $13     
         19        COUNT                                            ~14     $13
         20        IS_SMALLER                                       ~15     1, ~14
         21        BOOL                                             ~12     ~15
         22    > > JMPZ                                                     ~12, ->33
    9    23    >   UNSET_DIM                                                !1, !4
   10    24        INIT_FCALL_BY_NAME                                       'cleaner'
         25        INIT_FCALL                                               'implode'
         26        SEND_VAL                                                 '+'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                         $16     
         29        SEND_VAR_NO_REF_EX                                       $16
         30        DO_FCALL                                      0  $17     
         31        FE_FREE                                                  $8
         32      > RETURN                                                   $17
    7    33    > > JMP                                                      ->8
         34    >   FE_FREE                                                  $8
   13    35        INIT_FCALL                                               'implode'
         36        SEND_VAL                                                 '+'
         37        SEND_VAR                                                 !1
         38        DO_ICALL                                         $18     
         39      > RETURN                                                   $18
   14    40*     > RETURN                                                   null

End of function cleaner

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.59 ms | 1403 KiB | 20 Q