On Thu, Jun 02, 2011 at 04:07:25PM +0200, Patrick ALLAERT wrote:

> Not true. Here is a valid example that would break after implementing
> this as en error.
> 
> if ("$x" == "Array") {
>     array_walk( $x, "print_r" );
> }
> 
> I'm not saying that this is good code, I'm only saying that this would
> break BC which is even worst.
> ....

Good point.

The real problem is that there are 2 sorts of PHP programmers.

1) those who will be grateful of anything that can help them find errors
   in their code - these look at the error logs and correct their code.

2) those who write in a rush and as long as it appears to generate about
   the right sort of results are happy, they don't care for anything else.

Unfortunately too many programmers are of type (2). They will bitch at what
they (in some ways rightly) see as a break in BC.

Maybe we ought to make it a warning for the PHP 5 series and an error for
PHP 6. Breaks in BC are more acceptable at major releases.

-- 
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT 
Lecturer.
+44 (0) 787 668 0256  http://www.phcomp.co.uk/
Parliament Hill Computers Ltd. Registration Information: 
http://www.phcomp.co.uk/contact.php
#include <std_disclaimer.h>

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to