3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __construct() { register_shutdown_function( array( $this, '__destruct' ) ); } function bar() { } function __destruct() { return true; } } $GLOBALS['fb'] = new foo; function foo_bar( $buffer ) { $buffer .= "gettype( 'fb' ): " . gettype( $GLOBALS['fb'] ); return $buffer; } ob_start( 'foo_bar' );

preferences:
43.44 ms | 402 KiB | 5 Q