# Variable method names

- Thread: https://externals.io/message/202
- Original archive: https://news-web.php.net/php.internals/202
- Started by Jan Schneider on 2003-03-23T22:45:33+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #202 — Jan Schneider — 2003-03-23T22:45:33+00:00

URL: https://externals.io/message/202#202

Is there a reason or is it a bug that the following code doesn't work anymore?

class Foo {
  function bar()
  {
    echo "bar";
  }
}

$method = "bar";

Foo::$method();

parse error, unexpected '('

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft

---

## #205 — Zeev Suraski — 2003-03-24T09:33:01+00:00

URL: https://externals.io/message/202#205 · In reply to: #202

There is a reason, but it is a bug :)

Zeev

At 14:45 23/03/2003, Jan Schneider wrote:
>Is there a reason or is it a bug that the following code doesn't work anymore?
>
>class Foo {
>   function bar()
>   {
>     echo "bar";
>   }
>}
>
>$method = "bar";
>
>Foo::$method();
>
>parse error, unexpected '('
>
>Jan.
>
>--
>http://www.horde.org - The Horde Project
>http://www.ammma.de - discover your knowledge
>http://www.tip4all.de - Deine private Tippgemeinschaft
