3v4l.org

run code in 300+ PHP versions simultaneously
<?php function filter(&$input) { $input = htmlspecialchars($input, ENT_QUOTES, 'UTF-8'); } $test = array('<test>"hoi"</test>', '<script class="javascript">alert(\'hoi\')</script>'); array_walk_recursive($test, "filter"); var_dump($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rs7Rn
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'filter'
          4        DO_ICALL                                                 
   10     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function filter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.63 ms | 1395 KiB | 19 Q