Is there any way to force PHP to blow up (error, whatever) if I misspell a variable name? What about if I’m using an instance of a class and I spell the name of a variable wrong?
[I know that I should just get used to it, but maybe there’s a way to enforce name checking?]
Thanks!
Edit: Sorry, that wasn’t very specific. Here’s the code, and I would like to get two errors. Right now I only get one (for the last line).
error_reporting(E_ALL|E_STRICT); class Joe { public $lastName; } $joe = new Joe(); $joe->lastNombre = 'Smith'; echo 'And here it is ' . $jose;
Here is something I whipped up really quickly to show how you can trigger errors when something like that happens: