Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStanislaw Lorenz
8,903 PointsIs 'null' the same as 'Null'?
is
function fun($var = null) {}
the same as
function fun($var = Null) {}
If not, what is the difference between the two null's?
1 Answer
andren
28,558 PointsTo quote the official PHP documentation for the NULL value:
There is only one value of type null, and that is the case-insensitive constant NULL.
In other words Null
, null
, NULL
, or even NuLl
are all valid and mean the same thing in PHP as the NULL
value is case-insensitive.