3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sweet = ['a' => 'apple ', 'b' => ' "banana" ']; $array = ['sweet' => $sweet, 'test' => " <a href='test'>Test</a>"]; array_walk_recursive($array, function(&$value) { $value = htmlspecialchars(trim($value)); } ); var_export($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2lqYP
function name:  (null)
number of ops:  13
compiled vars:  !0 = $sweet, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_ARRAY                                       ~3      !0, 'sweet'
          2        ADD_ARRAY_ELEMENT                                ~3      '+%3Ca+href%3D%27test%27%3ETest%3C%2Fa%3E', 'test'
          3        ASSIGN                                                   !1, ~3
    6     4        INIT_FCALL                                               'array_walk_recursive'
          5        SEND_REF                                                 !1
          6        DECLARE_LAMBDA_FUNCTION                          ~5      [0]
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_export'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                                 
         12      > RETURN                                                   1


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

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.25 ms | 1003 KiB | 17 Q