I've always used the
die() function without the 'message' parameter but the function description over at w3schools suggested the 'message' parameter is required.
Must I use the 'message' parameter when using
die( 'Unable to do that' )
Hoping someone can confirm the right way to use the function.
According to the official manual
die is equivalent to
exit does not require an argument.
Also, I think lots of people feel that w3schools is not a good source of solid information. (Why?)
And also, exceptions are better (generally, depending of course on what you're doing).
In PHP missing parameters are replaced by
null - and since
null has a printable string representation (the empty string), it is perfectly legal, while not elegant, to use