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-- Test strrchr() function : usage variations - heredoc string containing blank line..
Decoded Output download
*** Testing strrchr() function: with heredoc strings ***
Did this file decode correctly?
Original Code
--TEST--
Test strrchr() function : usage variations - heredoc string containing blank line for 'haystack'
--FILE--
<?php
/* Test strrchr() function by passing heredoc string containing
* blank-line for haystack and with various needles
*/
echo "*** Testing strrchr() function: with heredoc strings ***\n";
$blank_line = <<<EOD
EOD;
$needles = array(
"\n",
'\n',
"\r",
"\r\n",
"\t",
"",
$blank_line //needle as haystack
);
//loop through to test strrchr() with each needle
foreach($needles as $needle) {
var_dump( strrchr($blank_line, $needle) );
}
echo "*** Done ***";
?>
--EXPECT--
*** Testing strrchr() function: with heredoc strings ***
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
*** Done ***
Function Calls
strrchr | 1 |
Stats
MD5 | d43f9e20f6f982d1329b6b7afd0e1b98 |
Eval Count | 0 |
Decode Time | 79 ms |