The Artima Developer Community
Sponsored Link

PHP Buzz Forum
the new E_ANAL error_reporting setting

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Alan Knowles

Posts: 390
Nickname: alank
Registered: Sep, 2004

Alan Knowles is Freelance Developer, works on PHP extensions and PEAR.
the new E_ANAL error_reporting setting Posted: Feb 21, 2005 11:30 PM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Alan Knowles.
Original Post: the new E_ANAL error_reporting setting
Feed Title: Smoking toooo much PHP
Feed URL: http://www.akbkhome.com/blog.php/RSS.xml
Feed Description: More than just a blog :)
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Alan Knowles
Latest Posts From Smoking toooo much PHP

Advertisement
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.

Read: the new E_ANAL error_reporting setting

Topic: Welcome to patPortal, Wiegi Previous Topic   Next Topic Topic: SHA-1 Broken

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use