On Wed, 2006-08-02 at 16:07 +0200, Derick Rethans wrote:
> On Wed, 2 Aug 2006, Zeev Suraski wrote:
> 
> > My recommendation:
> > - Add a new flag to methods (at the implementation level) that will allow to
> > flag them as 'strict'
> 
> Have an example of what you mean here?

Maybe something like the following...

<?

class foo
{
    function bleh( $p1, $p2 )
    {
        echo "Bleh: $p1, $p2\n";
    }
}

class fee extends foo
{
    loose function bleh( $p1 )
    {
        parent::bleh( $p1, $this->prop );
    }
}

?>

I think I like it :D In this case, no E_STRICT would be issued since we
specifically declared it as loose. if no "loose" declaration had been
added then as Zeev suggested an E_STRICT would be issued. If a "strict"
declaration was added then an E_ERROR would be issued. This would
provide backwards compatibility with an E_STRICT hit, and forward
compatibility without the E_STRICT hit so that your code doesn't look
erroneous. I think E_STRICT should enforce PHP rules, not OOP rules, so
in that sense no E_STRICT would be fired since the code follows the
rules of PHP development. Someone correct me if that is not PHPs
intended use of E_STRICT.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

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

Reply via email to