3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $_POST[1] = 'lolol'; $_POST[2] = '1l1l1l'; $_POST[3] = '<p><p>'; $_POST[4] = '*.*""'; function protect(){ addslashes($_POST); array_map("strip_tags",$_POST); } foreach($_POST as $k => $v){ echo $k,$v; } return $_POST;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 20
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/3l0lH
function name:  (null)
number of ops:  24
compiled vars:  !0 = $v, !1 = $k
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   FETCH_W                      global              $2      '_POST'
         1        ASSIGN_DIM                                               $2, 1
         2        OP_DATA                                                  'lolol'
   4     3        FETCH_W                      global              $4      '_POST'
         4        ASSIGN_DIM                                               $4, 2
         5        OP_DATA                                                  '1l1l1l'
   5     6        FETCH_W                      global              $6      '_POST'
         7        ASSIGN_DIM                                               $6, 3
         8        OP_DATA                                                  '%3Cp%3E%3Cp%3E'
   6     9        FETCH_W                      global              $8      '_POST'
        10        ASSIGN_DIM                                               $8, 4
        11        OP_DATA                                                  '%2A.%2A%22%22'
   8    12        NOP                                                      
  13    13        FETCH_R                      global              $10     '_POST'
        14      > FE_RESET_R                                       $11     $10, ->20
        15    > > FE_FETCH_R                                       ~12     $11, !0, ->20
        16    >   ASSIGN                                                   !1, ~12
  14    17        ECHO                                                     !1
        18        ECHO                                                     !0
        19      > JMP                                                      ->15
        20    >   FE_FREE                                                  $11
  16    21        FETCH_R                      global              $14     '_POST'
        22      > RETURN                                                   $14
        23*     > RETURN                                                   1

Function protect:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3l0lH
function name:  protect
number of ops:  10
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   INIT_FCALL                                               'addslashes'
         1        FETCH_R                      global              $0      '_POST'
         2        SEND_VAR                                                 $0
         3        DO_ICALL                                                 
  10     4        INIT_FCALL                                               'array_map'
         5        SEND_VAL                                                 'strip_tags'
         6        FETCH_R                      global              $2      '_POST'
         7        SEND_VAR                                                 $2
         8        DO_ICALL                                                 
  11     9      > RETURN                                                   null

End of function protect

Generated using Vulcan Logic Dumper, using php 7.3.0