3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ function strip_slashes_recursive( $variable ) { if ( is_string( $variable ) ) return stripslashes( $variable ) ; if ( is_array( $variable ) ) foreach( $variable as $i => $value ) $variable[ $i ] = $this->strip_slashes_recursive( $value ) ; return $variable ; } } $a = new a(); $array = array("f\\'oo", "b\\'ar", array("fo\\'o", "b\\'ar")); $array = $a->strip_slashes_recursive($array); print_r($array); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7QVc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        ASSIGN                                                   !1, <array>
   19     4        INIT_METHOD_CALL                                         !0, 'strip_slashes_recursive'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !1, $6
   22     8        INIT_FCALL                                               'print_r'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
   23    11      > RETURN                                                   1

Class a:
Function strip_slashes_recursive:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 19
Branch analysis from position: 9
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 18
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 18
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 19
filename:       /in/k7QVc
function name:  strip_slashes_recursive
number of ops:  21
compiled vars:  !0 = $variable, !1 = $value, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        TYPE_CHECK                                   64          !0
          2      > JMPZ                                                     ~3, ->7
    7     3    >   INIT_FCALL                                               'stripslashes'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6      > RETURN                                                   $4
    8     7    >   TYPE_CHECK                                  128          !0
          8      > JMPZ                                                     ~5, ->19
    9     9    > > FE_RESET_R                                       $6      !0, ->18
         10    > > FE_FETCH_R                                       ~7      $6, !1, ->18
         11    >   ASSIGN                                                   !2, ~7
   10    12        INIT_METHOD_CALL                                         'strip_slashes_recursive'
         13        SEND_VAR_EX                                              !1
         14        DO_FCALL                                      0  $10     
         15        ASSIGN_DIM                                               !0, !2
         16        OP_DATA                                                  $10
    9    17      > JMP                                                      ->10
         18    >   FE_FREE                                                  $6
   12    19    > > RETURN                                                   !0
   13    20*     > RETURN                                                   null

End of function strip_slashes_recursive

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.83 ms | 1400 KiB | 17 Q