• Wir genießen das Vertrauen von:
Entwicklung

What does this var_dump return?

By September 12, 2013 2 Kommentare

Tell us what does this var_dump return!


var_dump(
null == 0, # ?
false == 0, # ?
INF==INF, # ?
(-1*INF) == (-1*INF), # ?
(-1*INF) < (-1*INF), # ?
(-1*INF) > (-1*INF), # ?
'Interesting',
null == (-1*INF), # ?
false == (-1*INF), # ?
null < (-1*INF), # ?
false < (-1*INF) # ?
);

Join the discussion 2 Kommentare

  • Florin sagt:

    bool(true)
    bool(true)
    bool(true)
    bool(true)
    bool(false)
    bool(false)
    string(11) „Interesting“
    bool(false)
    bool(false)
    bool(true)
    bool(true)

  • Alin D. sagt:

    Florin, what version of PHP you used ?

    I tested on PHP 5.3.10-1ubuntu3.7 and i got :

    bool(true)
    bool(true)
    bool(false)
    bool(false)
    bool(true)
    bool(true)
    string(11) „Interesting“
    bool(false)
    bool(false)
    bool(true)
    bool(true)

    var_dump( INF == INF ) return false (INF is not equal with INF ?!?);

    var_dump( (-1*INF) == (-1*INF) ) return false (-INF not equal with -INF ?!?).

    var_dump((-1*INF) > (-1*INF)) return true (-INF > -INF ?!?).

    var_dump((-1*INF) < (-1*INF)) return true (-INF < -INF ???).

Kommentar hinterlassen