From:             [EMAIL PROTECTED]
Operating system: RHL 7.2
PHP version:      4.2.2
PHP Bug Type:     Feature/Change Request
Bug description:  include not allowed within class definition

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 bug report at http://bugs.php.net/?id=20058&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20058&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20058&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20058&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20058&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20058&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20058&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20058&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20058&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20058&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20058&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20058&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20058&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20058&r=isapi

Reply via email to