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 return type and value for expected input cosh() --INI-- precision = 14 --FIL..

Decoded Output download

--TEST--
Test return type and value for expected input cosh()
--INI--
precision = 14
--FILE--
<?php
/*
 * Function is implemented in ext/standard/math.c
*/

$file_path = __DIR__;
require($file_path."/allowed_rounding_error.inc");

echo "cosh .5  = ";
var_dump(cosh(0.5));

if (allowed_rounding_error(cosh(0.5),1.1276259652064)){
    echo "Pass
";
}
else {
    echo "Fail
";
}

echo "cosh -0.5  = ";
var_dump(cosh(-0.5));
if (allowed_rounding_error(cosh(-0.5),1.1276259652064)){
    echo "Pass
";
}
else {
    echo "Fail
";
}

echo "cosh 3  = ";
var_dump(cosh(3.0));
if (allowed_rounding_error(cosh(3.0), 10.067661995778)){
    echo "Pass
";
}
else {
    echo "Fail
";
}

echo "cosh -3  = ";
var_dump(cosh(-3.0));
if (allowed_rounding_error(cosh(-3.0), 10.067661995778)){
    echo "Pass
";
}
else {
    echo "Fail
";
}

?>
--EXPECTF--
cosh .5  = float(%f)
Pass
cosh -0.5  = float(%f)
Pass
cosh 3  = float(%f)
Pass
cosh -3  = float(%f)
Pass

Did this file decode correctly?

Original Code

--TEST--
Test return type and value for expected input cosh()
--INI--
precision = 14
--FILE--
<?php
/*
 * Function is implemented in ext/standard/math.c
*/

$file_path = __DIR__;
require($file_path."/allowed_rounding_error.inc");

echo "cosh .5  = ";
var_dump(cosh(0.5));

if (allowed_rounding_error(cosh(0.5),1.1276259652064)){
    echo "Pass\n";
}
else {
    echo "Fail\n";
}

echo "cosh -0.5  = ";
var_dump(cosh(-0.5));
if (allowed_rounding_error(cosh(-0.5),1.1276259652064)){
    echo "Pass\n";
}
else {
    echo "Fail\n";
}

echo "cosh 3  = ";
var_dump(cosh(3.0));
if (allowed_rounding_error(cosh(3.0), 10.067661995778)){
    echo "Pass\n";
}
else {
    echo "Fail\n";
}

echo "cosh -3  = ";
var_dump(cosh(-3.0));
if (allowed_rounding_error(cosh(-3.0), 10.067661995778)){
    echo "Pass\n";
}
else {
    echo "Fail\n";
}

?>
--EXPECTF--
cosh .5  = float(%f)
Pass
cosh -0.5  = float(%f)
Pass
cosh 3  = float(%f)
Pass
cosh -3  = float(%f)
Pass

Function Calls

None

Variables

None

Stats

MD5 d2f07ad05e2798b50bf89889845cd1cc
Eval Count 0
Decode Time 96 ms