3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function filterName($fullName) { return filter_var($fullName, FILTER_CALLBACK, ['options'=>function($value) { $value = trim($value); // strip tags $value = strip_tags($value); // remove double quotes $value = preg_replace('/["<>\{\}\[\]]+/', '', $value); return $value; }]); } } $user = new User; echo $user->filterName('Foo!"bar" Baz ø hello!<strong>poop</strong>') . "\n"; echo $user->filterName('@непроизносимые 誤解 की اللغويات') . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FuZZF
function name:  (null)
number of ops:  14
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $1      'User'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   18     3        INIT_METHOD_CALL                                         !0, 'filterName'
          4        SEND_VAL_EX                                              'Foo%21%22bar%22+Baz+%C3%B8+hello%21%3Cstrong%3Epoop%3C%2Fstrong%3E'
          5        DO_FCALL                                      0  $4      
          6        CONCAT                                           ~5      $4, '%0A'
          7        ECHO                                                     ~5
   19     8        INIT_METHOD_CALL                                         !0, 'filterName'
          9        SEND_VAL_EX                                              '%40%D0%BD%D0%B5%D0%BF%D1%80%D0%BE%D0%B8%D0%B7%D0%BD%D0%BE%D1%81%D0%B8%D0%BC%D1%8B%D0%B5+%E8%AA%A4%E8%A7%A3+%E0%A4%95%E0%A5%80+%D8%A7%D9%84%D9%84%D8%BA%D9%88%D9%8A%D8%A7%D8%AA'
         10        DO_FCALL                                      0  $6      
         11        CONCAT                                           ~7      $6, '%0A'
         12        ECHO                                                     ~7
         13      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FFuZZF%3A6%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FuZZF
function name:  {closure}
number of ops:  17
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'trim'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    9     5        INIT_FCALL                                               'strip_tags'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
   11     9        INIT_FCALL                                               'preg_replace'
         10        SEND_VAL                                                 '%2F%5B%22%3C%3E%5C%7B%5C%7D%5C%5B%5C%5D%5D%2B%2F'
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        ASSIGN                                                   !0, $5
   12    15      > RETURN                                                   !0
   13    16*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FFuZZF%3A6%240

Class User:
Function filtername:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FuZZF
function name:  filterName
number of ops:  10
compiled vars:  !0 = $fullName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1024
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FFuZZF%3A6%240'
   13     5        INIT_ARRAY                                       ~2      ~1, 'options'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
   14     9*     > RETURN                                                   null

End of function filtername

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.62 ms | 1400 KiB | 21 Q