3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function singleton( $value = null ) { static $data; if ( $value !== null ) { $data = $value; } return $data; } singleton( 100 ); echo singleton();
Output for 4.3.0 - 7.1.0
100