3v4l.org

run code in 500+ 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:/in/2lqYP:6}
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
          1        INIT_FCALL                                                   'htmlspecialchars'
          2        FRAMELESS_ICALL_1                trim                ~1      !0
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                             $2      
          5        ASSIGN                                                       !0, $2
          6      > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.18 ms | 2059 KiB | 16 Q