3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! $arr = array('a','b','c'); class Security { public static function safeArray($array){ array_walk_recursive( $array, function(&$array){ $array = htmlspecialchars(strip_tags($array)); } ); return $array; } } print_r(Security::safeArray($arr));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NPNZm
function name:  (null)
number of ops:  8
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'print_r'
          2        INIT_STATIC_METHOD_CALL                                  'Security', 'safeArray'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FNPNZm%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NPNZm
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     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
   11     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FNPNZm%3A9%240

Class Security:
Function safearray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NPNZm
function name:  safeArray
number of ops:  8
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'array_walk_recursive'
    8     2        SEND_REF                                                 !0
    9     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNPNZm%3A9%240'
   11     4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   13     6      > RETURN                                                   !0
   14     7*     > RETURN                                                   null

End of function safearray

End of class Security.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.39 ms | 1396 KiB | 21 Q