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 | |
header('Content-Type: text/html; charset=utf-8'); | |
define('POST_MAX_LENGTH', 4096); | |
if (!isset($_POST['txt'])) { | |
$txt = "<?php\necho 'Hello World!';\n?>"; | |
} elseif(strlen($_POST['txt']) > POST_MAX_LENGTH) { | |
$txt = substr($_POST['txt'], 0, POST_MAX_LENGTH); | |
} else { | |
$txt = $_POST['txt']; |
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 | |
/** | |
* Multibyte friendly tab replacer. | |
* @param string $line Line with tabs to convert | |
* @param int $tabsize Number of space characters in full width tab | |
* @return string Line without tabs | |
*/ | |
function tab2space($line, $tabsize = 4) | |
{ |
NewerOlder