Yes, this is going to be a problem.

I have thought one a way of dealing with it.  Let people declare in
their code that major version of PHP they have written their code for,
and issue "possible ambigous context" warnings unless it's declared
written for PHP 5.  For example, the code:

function bar()

class foo {
    function foo() {
        bar();
    }
    function bar() {
    }
}

Could emit an ambiguity warning by default, but if you stick "using_php
5;" or something like that at the very beginning, you say "yes I know of
all the issues involved with PHP 5" and get no warning.

Andi, would something like this be possible without more than negligible
overhead?

 - Stig

On Thu, 2002-02-07 at 09:35, Yasuo Ohgaki wrote:
> To upgrade from PHP4 to PHP5, most users should
> carefully change/test existing script unless
> their scripts are completely OO or non-OO.
> 
> This BC problem is worse than case sensitive names, IMHO.
> (BTW, I like ZE2 way than ZE1 way) PHP5 may call wrong
> function unless user change their code ;)
> 
> Case of names can be easily converted by program.
> And error with case sentive names is easier to
> understand what/where is wrong.
> 
> 
> [yohgaki@dev ze2]$ php name_space7.php
> 
> bar::bar()
> foo()
> 
> 
> [yohgaki@dev ze2]$ php-ze2 name_space7.php
> 
> bar::bar()
> bar::foo()
> 
> [yohgaki@dev ze2]$ cat name_space7.php
> <?php
> 
> $var = 'ABC';
> 
> function foo() {
>     echo "foo()\n";
> }
> 
> 
> class bar {
>          function bar()
>          {
>                  echo "bar::bar()\n";
>                  foo();
>          }
> 
>          function foo()
>          {
>                  echo "bar::foo()\n";
>          }
> 
> }
> 
> 
> $obj = new bar;
> 
> ?>
> [yohgaki@dev ze2]$
> 
> -- 
> Yasuo Ohgaki
> 
> 
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
> 


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

Reply via email to