3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (!function_exists('strip_slashes')) { /** * Un-quotes a quoted string. * * @param (mixed) $str - The input string. * @author Yousef Ismaeil Cliprz */ function strip_slashes($str) { if (is_array($str)) { foreach ($str as $key => $val) { $str[$key] = strip_slashes($val); } } else { $str = stripslashes($str); } return $str; } } $arr = array('Yousef\\\'s','\"PHP.net\"','user\\\'s'); echo 'With strip_slashes() function:<br />'; print_r(strip_slashes($arr)); echo '<br />'; echo 'Without strip_slashes() function:<br />'; print_r($arr); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/oQKu9
function name:  (null)
number of ops:  20
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'function_exists'
          1        SEND_VAL                                                 'strip_slashes'
          2        DO_ICALL                                         $1      
          3        BOOL_NOT                                         ~2      $1
          4      > JMPZ                                                     ~2, ->6
   11     5    >   DECLARE_FUNCTION                                         'strip_slashes'
   29     6    >   ASSIGN                                                   !0, <array>
   31     7        ECHO                                                     'With+strip_slashes%28%29+function%3A%3Cbr+%2F%3E'
   32     8        INIT_FCALL                                               'print_r'
          9        INIT_FCALL_BY_NAME                                       'strip_slashes'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
   33    14        ECHO                                                     '%3Cbr+%2F%3E'
   34    15        ECHO                                                     'Without+strip_slashes%28%29+function%3A%3Cbr+%2F%3E'
   35    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
   36    19      > RETURN                                                   1

Function %00strip_slashes%2Fin%2FoQKu9%3A11%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oQKu9
function name:  strip_slashes
number of ops:  20
compiled vars:  !0 = $str, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   13     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~3, ->14
   15     3    > > FE_RESET_R                                       $4      !0, ->12
          4    > > FE_FETCH_R                                       ~5      $4, !1, ->12
          5    >   ASSIGN                                                   !2, ~5
   17     6        INIT_FCALL_BY_NAME                                       'strip_slashes'
          7        SEND_VAR_EX                                              !1
          8        DO_FCALL                                      0  $8      
          9        ASSIGN_DIM                                               !0, !2
         10        OP_DATA                                                  $8
   15    11      > JMP                                                      ->4
         12    >   FE_FREE                                                  $4
         13      > JMP                                                      ->18
   22    14    >   INIT_FCALL                                               'stripslashes'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !0, $9
   25    18    > > RETURN                                                   !0
   26    19*     > RETURN                                                   null

End of function %00strip_slashes%2Fin%2FoQKu9%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
219.91 ms | 1400 KiB | 19 Q