|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-13 10:13 UTC] derick@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 10:00:02 2025 UTC |
Description: ------------ Hi, if you create an object befor you had described your class this will let crash your php code. If you create the object after you had described your class code all is fine. Reproduce code: --------------- File 1 with Class 1 <?php class f { var $f = null; function f() { $this->f = 5; } } ?> File 2 with Class 2 <?php require_once('test_a.php'); $b = new xy(); class xy extends f{ function xy() { echo $this->f; } } ?> Expected result: ---------------- The output had to be 5 Actual result: -------------- Fatal error: Cannot instantiate non-existent class: xy in c:\server_scripts\htdocs\scripts\test.php on line 3