예제 #1
0
function foo1()
{
    return NAN * NAN;
}
function foo2()
{
    return NAN * 2;
}
function foo3()
{
    return INF * NAN;
}
function foo4()
{
    return 2.0 * INF;
}
function foo5()
{
    return INF * INF;
}
function foo6($a)
{
    return $a * 2.0;
}
var_dump(foo1());
var_dump(foo2());
var_dump(foo3());
var_dump(foo4());
var_dump(foo5());
var_dump(foo6(3.1));
예제 #2
0
    }
    function foo2()
    {
        echo __NAMESPACE__ . "\n";
    }
    function foo5()
    {
        echo __NAMESPACE__ . "\n";
    }
}
namespace A\B\C {
    foo();
    foo2();
    foo3();
    foo4();
    foo5();
    function foo4()
    {
    }
}
namespace A\B\C\D {
    function foo()
    {
        echo __NAMESPACE__ . "\n";
    }
    function foo2()
    {
        echo __NAMESPACE__ . "\n";
    }
    function foo5()
    {
예제 #3
0
    return $x | $x;
}
function foo5($x)
{
    return -1 | $x;
}
function foo6($x, $y, $z)
{
    return $x & $y | $x & $z;
}
function foo7($x, $y, $z)
{
    return $y & $x | $x & $z;
}
function foo8($x, $y, $z)
{
    return $x & $y | $z & $x;
}
function foo9($x, $y, $z)
{
    return $y & $x | $z & $x;
}
var_dump(foo1());
var_dump(foo2());
var_dump(foo3(4));
var_dump(foo4(4));
var_dump(foo5(4));
var_dump(foo6(4, 6, 7));
var_dump(foo7(4, 6, 7));
var_dump(foo8(4, 6, 7));
var_dump(foo9(4, 6, 7));
예제 #4
0
    return $x - $x + 3;
}
function foo5($x)
{
    return $x + 3 - $x;
}
function foo6($x)
{
    return 0 - $x;
}
function foo7($x)
{
    return $x - 0;
}
function foo8($x)
{
    return $x - 1;
}
function foo9($x)
{
    return 1 - $x;
}
var_dump(foo1(5, 2));
var_dump(foo2(1, 2));
var_dump(foo3(-3));
var_dump(foo4(5));
var_dump(foo5(5));
var_dump(foo6(-3));
var_dump(foo7(3));
var_dump(foo8(4));
var_dump(foo9(-2));
예제 #5
0
{
    return $y * $x + $z * $x;
}
function foo9($x, $y)
{
    return $x * 3 * ($y * 7);
}
function foo10($x)
{
    return 3 * $x * 7;
}
function foo11($x)
{
    return $x * 8;
}
function foo12($x)
{
    return $x * -8;
}
var_dump(foo1());
var_dump(foo2(6));
var_dump(foo3(6, 2));
var_dump(foo4(-12));
var_dump(foo5(2, 1, 5));
var_dump(foo6(2, 1, 5));
var_dump(foo7(2, 1, 5));
var_dump(foo8(2, 1, 5));
var_dump(foo9(2, 5));
var_dump(foo10(2));
var_dump(foo11(7));
var_dump(foo12(3));
예제 #6
0
}
function foo2()
{
    $x = 5;
    $y = false;
    return $x xor $y;
}
function foo3()
{
    $x = 5;
    $y = 5;
    return $x ^ $y;
}
function foo4($x, $y)
{
    return $x ^ $y;
}
function foo5($x)
{
    return ~$x;
}
function foo6($x)
{
    return !$x;
}
var_dump(foo1());
var_dump(foo2());
var_dump(foo3());
var_dump(foo4(3, 5));
var_dump(foo5(1));
var_dump(foo6(5));