Voting

: three plus two?
(Example: nine)

The Note You're Voting On

kawewong at gmail dot com
3 years ago
Warning: `parse_str()` can cause "Input variables exceeded 1000" error (1000 is default php.ini setting for `max_input_vars`).

Test code.

<?php

$inputString
= 'first=firstvalue';

for (
$i = 1; $i <= 1100; $i++) {
$inputString .= '&arrLoopNumber[]=' . $i;
}
unset(
$i);

echo
'input string: <code>' . $inputString . '</code><br>' . PHP_EOL;
echo
'<h5>doing <code>parse_str()</code></h5>' . PHP_EOL;

$output = [];
parse_str($inputString, $output);
// errors!!
?>

<< Back to user notes page

To Top