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-- max() tests --INI-- precision=14 --FILE-- <?php try { var_dump(max(1)); } ca..
Decoded Output download
--TEST--
max() tests
--INI--
precision=14
--FILE--
<?php
try {
var_dump(max(1));
} catch (\TypeError $e) {
echo $e->getMessage() . "
";
}
try {
var_dump(max(array()));
} catch (\ValueError $e) {
echo $e->getMessage() . "
";
}
try {
var_dump(max(new stdclass));
} catch (\TypeError $e) {
echo $e->getMessage() . "
";
}
var_dump(max(2,1,2));
var_dump(max(2.1,2.11,2.09));
var_dump(max("", "t", "b"));
var_dump(max(false, true, false));
var_dump(max(true, false, true));
var_dump(max(1, true, false, true));
var_dump(max(0, true, false, true));
?>
--EXPECT--
max(): Argument #1 ($value) must be of type array, int given
max(): Argument #1 ($value) must contain at least one element
max(): Argument #1 ($value) must be of type array, stdClass given
int(2)
float(2.11)
string(1) "t"
bool(true)
bool(true)
int(1)
bool(true)
Did this file decode correctly?
Original Code
--TEST--
max() tests
--INI--
precision=14
--FILE--
<?php
try {
var_dump(max(1));
} catch (\TypeError $e) {
echo $e->getMessage() . "\n";
}
try {
var_dump(max(array()));
} catch (\ValueError $e) {
echo $e->getMessage() . "\n";
}
try {
var_dump(max(new stdclass));
} catch (\TypeError $e) {
echo $e->getMessage() . "\n";
}
var_dump(max(2,1,2));
var_dump(max(2.1,2.11,2.09));
var_dump(max("", "t", "b"));
var_dump(max(false, true, false));
var_dump(max(true, false, true));
var_dump(max(1, true, false, true));
var_dump(max(0, true, false, true));
?>
--EXPECT--
max(): Argument #1 ($value) must be of type array, int given
max(): Argument #1 ($value) must contain at least one element
max(): Argument #1 ($value) must be of type array, stdClass given
int(2)
float(2.11)
string(1) "t"
bool(true)
bool(true)
int(1)
bool(true)
Function Calls
None |
Stats
MD5 | ce06d464db999da7226f39824a81c0bc |
Eval Count | 0 |
Decode Time | 72 ms |