php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15401 include of parent class
Submitted: 2002-02-06 06:02 UTC Modified: 2002-02-06 06:48 UTC
From: av at brainbits dot de Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.1.1 OS: SuSE 7.2
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: av at brainbits dot de
New email:
PHP Version: OS:

 

 [2002-02-06 06:02 UTC] av at brainbits dot de
Hi , 
i have a problem with follwing code :

1. File "A.php"
<?php
class A {
	function A(){
		echo "jo";
	}
}
?>

2. File "B.php"
<?php
require_once("A.php");
class B extends A {
	function B(){
		echo "jojo";
	}
}
?>

3. File
<?php
require_once("B.php");
$b=new B;

Error is :
Fatal error : cannot redeclare class A:B on line 2 in B.php


include_path is ok , what is a problem ?

best regards
Alexander Vasiliev 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-06 06:48 UTC] yohgaki@php.net
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 02 16:01:33 2024 UTC