What does this var_dump return?

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) # ?
);

2 thoughts on “What does this var_dump return?”

  1. bool(true)
    bool(true)
    bool(true)
    bool(true)
    bool(false)
    bool(false)
    string(11) “Interesting”
    bool(false)
    bool(false)
    bool(true)
    bool(true)

  2. 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 ???).

Leave a Comment

Your email address will not be published.

Scroll to Top