Call to undefined method after upgrading to PHP 5.4.0
问题 Stumped by this one. This code is giving me PHP Fatal error: Call to undefined method MyObject::helloWorld() But only the second time I run it, the first time it runs fine. class MyObject { function __construct() { echo("creating MyObject..."); } public function helloWorld() { echo("Hello World!"); } } $obj = new MyObject(); $obj->helloWorld(); I also see "creating MyObject..." generated the second time, but not "Hello World!". I'm in the process of upgrading to PHP 5.4.0. I Must be missing