3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Julio { protected static $instance = false; public function __construct( $args = array() ) {} public function get_instance() { if ( ! self::$instance ) { $className = __CLASS__; self::$instance = new $className( $args ); } return self::$instance; } } $j = new Julio(); var_dump( $j );
based on W6nBh
Output for 5.4.0 - 7.2.0
object(Julio)#1 (0) { }