Magento, why is PHP's type hinting allowing NULL in place of an object?

+1 vote
asked Mar 15, 2016 by Gun245 (1,440 points)
Why is PHP's type hinting allowing object through when it is NULL.

3 Answers

+1 vote
answered Apr 2, 2016 by Ure_here (1,650 points)
selected Apr 4, 2016 by vg8701
Best answer
Posting this again here. See for an example
commented Apr 4, 2016 by vg8701 (410 points)
I know this answer is late for this question. Check more elaborate explanation here
0 votes
answered Mar 26, 2016 by Bafford (460 points)

There are several functions that return either a string, FALSE, or NULL.
Adding the type of params and returns is the main subject of this issue. We're documenting data types, not data values.
0 votes
answered Jun 2, 2016 by Guerette (150 points)
Is this a defect in Firefox/Linux or is it a defect in the page design
commented Jun 4, 2016 by Also_Also (120 points)
After reading through this and a few threads this was the solution I went with. There is not much difference between the two
commented Jun 4, 2016 by lebouf_Me (520 points)
You can check it out here

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!