3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php define("TEST_STRING", "Hello World!"); class RequestObserver { public function __construct() { ob_start(); } public function __destruct() { $content = ob_get_flush(); if ($content == TEST_STRING) { echo PHP_EOL, "+ Test passed"; } else { echo PHP_EOL, "- Test failed:", PHP_EOL; var_dump($content); } } } $observer = new RequestObserver(); echo TEST_STRING;
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.1
Hello World! + Test passed
Output for hhvm-3.12.14 - 3.17.3
Hello World! - Test failed: bool(false)