|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-07-10 10:30 UTC] bmironov at jonview dot com
[2002-07-10 10:30 UTC] derick@php.net
[2003-06-28 17:16 UTC] velocity at charter dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 20:00:01 2025 UTC |
File 1.php <?php class Test { var $text; function Test ($_text) { $this->text = $_text; } require_once ('2.inc'); } $a = new Test ("ABC"); $a->output(); ?> File 2.inc <?php function output () { print $this->text; } ?> It will produce following error: Parse error: parse error, unexpected T_REQUIRE_ONCE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /usr/local/apache/root/php/test/1.php on line 8