3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data_billding= array( 'first_name' => "<b>hello</b>", 'last_name' => "<i>hello</i>", 'email' => "\hello", 'phone' => "he\llo", 'address' => "<h1>hello</h1>", ); function change($value, $key){ $key = stripslashes(strip_tags($key)); $value = stripslashes(strip_tags($value)); global $a; $a[] = array($key => $value); //print_r($a); } array_walk_recursive($data_billding, "change"); print_r($a); function my_function($value){ return stripslashes(strip_tags($value)); } /*trả về array chứa value nếu hàm my_function trả về TRUe*/ print_r(array_filter($data_billding,"my_function")); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A36PJ
function name:  (null)
number of ops:  16
compiled vars:  !0 = $data_billding, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   22     1        INIT_FCALL                                               'array_walk_recursive'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'change'
          4        DO_ICALL                                                 
   25     5        INIT_FCALL                                               'print_r'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                                 
   34     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL                                               'array_filter'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 'my_function'
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                                 
   36    15      > RETURN                                                   1

Function change:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A36PJ
function name:  change
number of ops:  21
compiled vars:  !0 = $value, !1 = $key, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'stripslashes'
          3        INIT_FCALL                                               'strip_tags'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
   15     9        INIT_FCALL                                               'stripslashes'
         10        INIT_FCALL                                               'strip_tags'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                         $7      
         15        ASSIGN                                                   !0, $7
   16    16        BIND_GLOBAL                                              !2, 'a'
   17    17        INIT_ARRAY                                       ~10     !0, !1
         18        ASSIGN_DIM                                               !2
         19        OP_DATA                                                  ~10
   20    20      > RETURN                                                   null

End of function change

Function my_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A36PJ
function name:  my_function
number of ops:  9
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   RECV                                             !0      
   30     1        INIT_FCALL                                               'stripslashes'
          2        INIT_FCALL                                               'strip_tags'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   31     8*     > RETURN                                                   null

End of function my_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.18 ms | 1405 KiB | 23 Q