note 38960 rejected from function.include by nlopess

From: Date: Tue, 13 Jan 2004 14:40:23 +0000
Subject: note 38960 rejected from function.include by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-63412@lists.php.net to get a copy of this message
Note Submitter: ---- When trying to deport validated methods from a class into a separate file and use include (or include_once or require or require_once), PHP error is : parse error, unexpected T_INCLUDE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' Code: class A extends B { var aa; function ff () { } include ("otherfunctions.class.inc.php"); function gg () { } } We can use include and al. everywhere except in a class ?

« previous php.notes (#63412) next »