Published 2005-02-22 10:57:28

After quite a few chats on various php-irc developer channels, it looks like PHP is going to be getting a new error_reporting level, E_ANAL.

while E_STRICT has been quite sucessfull in getting people to migrate from C# and Java, there is a sense that it is not quite complete. Apparently quite a number of them are missing their fatal exceptions on mundane issues). hence the new planned E_ANAL notices will start appearing when
  • you forget to declare a variable type before using it. (just giving it a default value doesnt count)
  • you try and do boolean tests on strings, integers, object (or anything that isnt a boolean)
  • string comparison on non-strings (although I'm tempted to suggest this for E_STRICT)
  • you declare a function (that's not part of a class)
  • you forget to put the return type of a method.
  • you forget to wrap a method call that can throw an exception in a try{ } catch block.
  • you make any property public (only available with the E_ANAL_JAVA extension).
  • any usage of PHP native array's or array functions.
  • any method call that does not involve at least 3 objects.
  • using any variable name that matches a object or method name anywhere in the imported methods or functions.
Of course while E_ANAL is regarded as esential for developing any enterprise applications, It is however highly recommended that it's turned off if you actually want to get anything done.

Developers are still open to new ideas for it.
yes - it's a joke :)
Mentioned By:
google.com : february (112 referals)
joona.fiveam.org : v p (33 referals)
www.midgard-project.org : PHPDeveloper.org: PHP News, Views, and Community... (29 referals)
richardathome.no-ip.com : Richard@Home : Welcome :-) (17 referals)
google.com : december (17 referals)
www.sitepoint.com : SitePoint Forums - What methods do YOU use to debug/test your code? (15 referals)
richardathome.no-ip.com : Richard@Home : PHP - Articles and Bookmarks (12 referals)
www.artima.com : PHP Buzz Forum - the new E_ANAL error_reporting setting (7 referals)
laacz.lv : Archivs (ļāūņš ļāčīš) (7 referals)
google.com : E_ANAL (7 referals)
my.yahoo.com : IRC Log for #peragro on irc.freenode.net, collected by PT_log-bot (5 referals)
laacz.lv : Around the web in 80 days #4 (ļāūņš ļāčīš) (5 referals)
google.com : error_reporting (5 referals)
google.com : november (5 referals)
www.livejournal.com : Max 'AMiGo' Gashkov's Journal (4 referals)
planet-php.org : My daily fix (4 referals)
google.com : 1935713 (4 referals)
google.com : E_STRICT php (4 referals)
google.com : php E_ANAL (4 referals)
forum.domonet.ru : @ (4 referals)

Comments

look me a bit
It took me a bit to realize it was a joke.
#0 - ryan ( Link) on 2005-02-22 13:43:09 Delete Comment
Having a point - after all
While I usually overlook your rants about $RANDOM, I quite feel the same regarding this issue (if I didn't misunderstand the joke) :)

I thought about out-sed-ing E_STRICT errors from php-src... ;)
#1 - Mike ( Link) on 2005-02-22 16:39:11 Delete Comment
Thats Java
It is not a Joke its JEE (Java Enterprice Edition)

>ny method call that does not involve at least 3 objects.

Thats the reality in Enterprice Java Developent.

The non-existence of E_ANAL is the reason, wy we use PHP and not JEE
#2 - Mucki ( Link) on 2005-02-22 18:56:48 Delete Comment
A Classic
Thanks for brightening up a dull day :-D
#3 - Richard@Home ( Link) on 2005-02-22 21:22:04 Delete Comment
took some time
Very nice! I have to admit that I made it half through list before noticing that's a joke.
#4 - Jan Schneider ( Link) on 2005-02-23 08:19:26 Delete Comment
Gado-gado
Actually it'd be nice if PHP would allow more "strong typing", just like the type hinting already available in PHP5, but just allow it for more uses, including class variables, and return values are good too.

Omitting the type would mean "mixed", which will be the same as current PHP behavior. But users wanting to have strong typing would be happy to have this feature.

BTW typing is not a Java thing. I came from Pascal and C, C++, they all use types. The fact that PHP was only a preprocessor and now a full-fledged programming language with broader uses, such as PHP-Gtk, makes this is actually "necessary".

And no, this isn't a joke. (and if anybody listens)
#5 - Hendy Irawan ( Link) on 2005-02-24 14:52:31 Delete Comment

Add Your Comment

Follow us on