|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-04-09 16:47 UTC] sniper@php.net
[2003-04-21 09:18 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 03:00:01 2025 UTC |
A variable function can be called on a normal function just fine: ------------------------------ function test() { return "test1"; } $function = "test"; echo $function(); ------------------------------ This outputs: test However trying the same thing on a funciton inside a class will fail: ------------------------------ class Test { function Test() { } function testClass() { return "test 2"; } } $function = "Test::testClass"; echo $function(); ------------------------------ Calling: echo Test::testClass(); works fine, however the above code does not. It should output: test 2 However it returns an error similar to the following: Fatal error: Call to undefined function: registration::formatdate() in /home/gaza/public_html/fp_php/support/table.php on line 396