3
ctrlz
6y

Oke... I do NOT want to start a war about PHP because i am usually a big fan, but this just blew my mind.

round(null) = 0

HOW DO YOU ROUND NON EXISTENT?

Comments
  • 1
    @1989 type conversion. No reasonably competent Dev uses == in JS anyway so it's not a problem

    @ctrlz PHP was invented by a non developer for non developer. Probablly explains alot about it 😄
  • 0
    Well it /is/ documented behavior: http://php.net/manual/en/...
    The saucy bit: "If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero)."
Add Comment