$input |
= |
[ 'predefined_var' => '$_POST', 'data' => [ 'product_id' => 'libgd<script>', 'component' => '10', 'versions' => '2.0.33', 'testscalar' => [ 0 => '2', 1 => '23', 2 => '10', 3 => '12', ], 'testarray' => '2', ], 0 => 'INPUT_POST', 1 => [ 'product_id' => 'FILTER_SANITIZE_ENCODED', 'component' => [ 'filter' => 'FILTER_VALIDATE_INT', 'flags' => 'FILTER_REQUIRE_ARRAY', 'options' => [ 'min_range' => 1, 'max_range' => 10, ], ], 'versions' => 'FILTER_SANITIZE_ENCODED', 'doesnotexist' => 'FILTER_VALIDATE_INT', 'testscalar' => [ 'filter' => 'FILTER_VALIDATE_INT', 'flags' => 'FILTER_REQUIRE_SCALAR', ], 'testarray' => [ 'filter' => 'FILTER_VALIDATE_INT', 'flags' => 'FILTER_REQUIRE_ARRAY', ], ], ] |
$test_output |
= |
[ 'result' => [ 'mixed' => [ 'product_id' => 'libgd%3Cscript%3E', 'component' => false, 'versions' => '2.0.33', 'doesnotexist' => NULL, 'testscalar' => false, 'testarray' => false, ], ], 'php_version' => '7.1.33 Linux x86_64', ] |