ID:               26776
 Comment by:       jerome dot dury at cegedim dot fr
 Reported By:      ganfset-php at dreams4net dot com
 Status:           Bogus
 Bug Type:         Class/Object related
 Operating System: Linux
 PHP Version:      5CVS-2004-01-03 (dev)
 New Comment:

I do really think it's a bug. And what else would you it to be ?
Actually, it is a regression bug : something what was working in older
versions (<5) is no more available in the new one.

I'm ok that 'parent' is THE good way to call that functionnality. But
if it was possible to make the call without case sensitivity, it should
be the same in PHP5. 

What I'm sure for now is that all websites that me and my developement
group are not compatible with PHP5. And I think it's a serious
regression. What do you think ?


Previous Comments:
------------------------------------------------------------------------

[2004-01-03 10:05:18] manico-php at wdmedia dot net

And what is it if it's not a bug ? a feature ?!? So there will be
keywords that work only in lowercase and some others (like if, echo)
wont be case sensitive ? or parent and self aren't keywords ? this
seems to be strange...

------------------------------------------------------------------------

[2004-01-03 09:29:26] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

.

------------------------------------------------------------------------

[2004-01-03 09:13:50] ganfset-php at dreams4net dot com

Description:
------------
In PHP4 and first PHP5 betas you could ask a parent method form a
object with the following syntax : parent::method(). It was possible to
use parent:: or PARENT::
Use of caps is important as it make possible to better distinguish the
keyword from a classname

In the last betas (tested in php-5.0.0b3 and php5-200401031230)
PARENT:: in caps output an error (Fatal error:  Class 'PARENT' not
found). Same error comes with SELF:: in caps (while parent:: and self::
are OK)

Reproduce code:
---------------
<?php
class foo {
 function min() { echo "parent::method OK" ; }
 function maj() { echo "PARENT::method OK" ; }
}
class bar extends foo {
 function min() { parent::min() ; }
 function maj() { PARENT::maj() ; }
}

$obj = new bar ;
$obj->min() ; // ok in PHP4 and last PHP5
echo "\n" ;
$obj->maj() ; // error on last PHP5 snaps

Expected result:
----------------
parent::method OK
PARENT::method OK

Actual result:
--------------
parent::method OK
<br />
<b>Fatal error</b>:  Class 'PARENT' not found in <b>-</b> on line
<b>8</b><br />


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26776&edit=1

Reply via email to