Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- php_user_filter onCreate() returns false --FILE-- <?php class my_filter extends ..
Decoded Output download
--TEST--
php_user_filter onCreate() returns false
--FILE--
<?php
class my_filter extends php_user_filter {
function onCreate(): bool {
return false;
}
}
stream_filter_register("my_filter", "my_filter");
$fp = fopen('php://memory', 'rw');
var_dump(stream_filter_append($fp, "my_filter"));
fwrite($fp, "Test");
fseek($fp, 0);
var_dump(fgets($fp));
fclose($fp);
?>
--EXPECTF--
Warning: stream_filter_append(): Unable to create or locate filter "my_filter" in %s on line %d
bool(false)
string(4) "Test"
Did this file decode correctly?
Original Code
--TEST--
php_user_filter onCreate() returns false
--FILE--
<?php
class my_filter extends php_user_filter {
function onCreate(): bool {
return false;
}
}
stream_filter_register("my_filter", "my_filter");
$fp = fopen('php://memory', 'rw');
var_dump(stream_filter_append($fp, "my_filter"));
fwrite($fp, "Test");
fseek($fp, 0);
var_dump(fgets($fp));
fclose($fp);
?>
--EXPECTF--
Warning: stream_filter_append(): Unable to create or locate filter "my_filter" in %s on line %d
bool(false)
string(4) "Test"
Function Calls
None |
Stats
MD5 | 7255ce20e19f9b91033bddfb804e9a9c |
Eval Count | 0 |
Decode Time | 102 ms |