Skip to content

Instantly share code, notes, and snippets.

@SerafimArts
Last active October 27, 2018 18:35
Show Gist options
  • Save SerafimArts/032813184942bf4f9db003010d186400 to your computer and use it in GitHub Desktop.
Save SerafimArts/032813184942bf4f9db003010d186400 to your computer and use it in GitHub Desktop.
Real monkey patching
<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>
<?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);
@adevyatov
Copy link

adevyatov commented Sep 13, 2016

<style>input, pre { margin: 20px 50px; }</style>
`



`

<pre><?php var_dump($_POST); ?></pre>

Или я чего-то не понимаю?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment