From: schaa101 at tech dot nhl dot nl Operating system: Windows XP Pro SP2 PHP version: 5.0.2 PHP Bug Type: Class/Object related Bug description: Wrong instance returned with 2 singletons
Description: ------------ When you use 2 singletons, the second singeleton also returns the instance of the first. If you change the name of the variables, that store the instance of the singleton class, inside the singletons and make them both unique, the problem is solved though. Reproduce code: --------------- http://klaas.fiskaaf.com/singleton-bug.rar or try http://klaas.fiskaaf.com/singleton-bug.zip Expected result: ---------------- Singleton1 - Singleton1 Singleton2 - Singleton2 Actual result: -------------- Singleton1 - Singleton1 Singleton1 - Singleton2 -- Edit bug report at http://bugs.php.net/?id=30958&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30958&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30958&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30958&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30958&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30958&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30958&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30958&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30958&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30958&r=support Expected behavior: http://bugs.php.net/fix.php?id=30958&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30958&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30958&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30958&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30958&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30958&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30958&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30958&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30958&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30958&r=mysqlcfg