php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27602 register(ticks=1) breaks class inheritence
Submitted: 2004-03-15 05:59 UTC Modified: 2004-03-15 07:36 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: csmall at enc dot com dot au Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 4.3.4 OS: Debian Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
29 + 36 = ?
Subscribe to this entry?

 
 [2004-03-15 05:59 UTC] csmall at enc dot com dot au
Description:
------------
Classes must be declared in order when you have declare(ticks=1) in the file (or any file that includes it). They do not have to be if the declaration is not used.


Reproduce code:
---------------
<?php 
declare(ticks=1); 
class foo2 extends foo1 { var $value; } 
class foo1 { var $myvalue; }
?>

Expected result:
----------------
See nothing, no error importantly.

Actual result:
--------------
Fatal error: Class foo2:  Cannot inherit from undefined class foo1 in /home/csmall/test.php on line 3


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-15 07:36 UTC] sniper@php.net
In PHP 5 you have to do this anyway -> wont fix.

 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 22:04:50 2022 UTC