3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Security { public static function safeString(&$string){ $string = htmlspecialchars(strip_tags($string)); } public static function safeArray(&$array){ return array_walk_recursive($array, 'safeString'); } } echo Security::safeString('<br>');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F6cpO
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'Security', 'safeString'
          1        SEND_VAL_EX                                              '%3Cbr%3E'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Class Security:
Function safestring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F6cpO
function name:  safeString
number of ops:  9
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'htmlspecialchars'
          2        INIT_FCALL                                               'strip_tags'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7        ASSIGN                                                   !0, $2
    5     8      > RETURN                                                   null

End of function safestring

Function safearray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F6cpO
function name:  safeArray
number of ops:  7
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'safeString'
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
    9     6*     > RETURN                                                   null

End of function safearray

End of class Security.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.61 ms | 1395 KiB | 19 Q