Last active
October 27, 2018 18:35
-
-
Save SerafimArts/032813184942bf4f9db003010d186400 to your computer and use it in GitHub Desktop.
Real monkey patching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style>input, pre { margin: 20px 50px; }</style> | |
<form action="/" method="POST"> | |
<input type="text" name="some.any.ololo..." /> | |
<input type="submit" /> | |
</form> | |
<pre><?php var_dump($_POST); ?></pre> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ================ NOTE ============== | |
// Literally Monkey Patching (LMP) | |
// | |
// PHP Feature: http://php.net/manual/en/language.variables.external.php | |
// > Dots and spaces in variable names are converted to underscores. | |
// | |
// All dots must be replace to monkey: 🐵 (U+1F435) | |
// All whitespaces must be replace to banana: 🍌 (U+1F34C) | |
// ================ NOTE ============== | |
$path = str_replace(['🐵', '🍌'], ['.', ' '], $path); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<style>input, pre { margin: 20px 50px; }</style>
`
`
<pre><?php var_dump($_POST); ?></pre>
Или я чего-то не понимаю?