3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Singleton{ public static $error = "Fout opgetreden"; /** * Returns the Singleton instance of this class. * @return Singleton The Singleton instance. */ public static function getInstance(){ $instance = new self(); return $instance; } /** * Private constructor to prevent creating a new instance of the Singleton via the `new` operator from outside of this class. */ private function __construct(){ } } //$obj = Singleton::getInstance(); echo Singleton::$error; // displays Fout opgetreden
Output for git.master, git.master_jit, rfc.property-hooks
Fout opgetreden

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
46.03 ms | 401 KiB | 8 Q