Date: 05/23/01
- Next message: symetrie <email protected>: "[PHP-DEV] Bug #11074: array_splice used to insert associative array forgets first key"
- Previous message: Yusuf Goolamabbas: "Re: [PHP-DEV] libtool configure fails [was Re: [PHP-DEV] Trying to get buildconf to use libtool 1.4 installed in non-standard place]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: symetrie <email protected>
Operating system: Linux SuSE 6.4
PHP version: 4.0.4pl1
PHP Bug Type: Class/Object related
Bug description: parent::Function() does not work if parent class is included
test1.php contains :
<?php
class a {
function MyFunct($i, $j, $k='defaut_k') {
echo " in a ";
}
}
?>
test2.php contains
<?php
include("test1.php");
class b extends a {
function MyFunct($i, $j, $k='defaut_k') {
echo " in b ";
parent::MyFunct($i,$j,$k); // does not work
// got : Fatal error: No parent class available in this context in ...
a::MyFunct($i,$j,$k); // works
}
}
whereas first example presented here works fine for me :
http://www.php.net/manual/en/keyword.parent.php
-- Edit Bug report at: http://bugs.php.net/?id=11073&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: symetrie <email protected>: "[PHP-DEV] Bug #11074: array_splice used to insert associative array forgets first key"
- Previous message: Yusuf Goolamabbas: "Re: [PHP-DEV] libtool configure fails [was Re: [PHP-DEV] Trying to get buildconf to use libtool 1.4 installed in non-standard place]"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

