示例#1
0
function foo8()
{
    $x = array();
    return (bool) $x;
}
function foo9()
{
    $x = array(1, 2, 3);
    return (bool) $x;
}
function foo10()
{
    $x = array();
    return (string) $x;
}
function foo11()
{
    $x = array(1, 2, 3);
    return (string) $x;
}
var_dump(foo1());
var_dump(foo2(5, 6));
var_dump(foo3());
var_dump(foo4());
var_dump(foo5());
var_dump(foo6(2));
var_dump(foo7(2));
var_dump(foo8());
var_dump(foo9());
var_dump(foo10());
var_dump(foo11());
示例#2
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));
示例#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
function foo9($x)
{
    $y = $x + 1;
    return $y === 6;
}
function foo10($x)
{
    $y = $x + 1;
    return $y !== 6;
}
function foo11($x)
{
    $y = $x xor 0;
    return $y === 6;
}
function foo12($x)
{
    return $x !== 6;
}
var_dump(foo1());
var_dump(foo2());
var_dump(foo3());
var_dump(foo4());
var_dump(foo5());
var_dump(foo6());
var_dump(foo7());
var_dump(foo8());
var_dump(foo9(5));
var_dump(foo10(5));
var_dump(foo11("5"));
var_dump(foo12("6"));
示例#5
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));
示例#6
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));
示例#7
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));