#20058 [Opn->]: include not allowed within class definition

From: Date: Thu, 24 Oct 2002 12:27:57 +0000
Subject: #20058 [Opn->]: include not allowed within class definition
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-23188@lists.php.net to get a copy of this message
ID: 20058 Updated by: derick@php.net Reported By: ernest@vogelsinger.at -Status: Open +Status: Won\'t fix Bug Type: Feature/Change Request Operating System: RHL 7.2 PHP Version: 4.2.2 New Comment: This has come up before on several occasions, and it was decided not to implement is. (Although I would like to see this kind od functionality too). You can try to write to engine2@lists.zend.com to show your support for this though. Derick Previous Comments: ------------------------------------------------------------------------ [2002-10-24 07:25:01] ernest@vogelsinger.at It appears as if "include()" and "require()" cannot appear inside a class definition, but outside a class method. For example, the construct class A { include ('class_a_methods.php'); } returns an error (unexpected T_INCLUDE), but class A { function foo() { include ('class_a_foo_method.php'); } } works as expected. This is a slight annoyance if one wants to keep class code in manageable chunks. Please add this feature in an upcoming version! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20058&edit=1

« previous php.bugs (#23188) next »