3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(defined('HHVM_VERSION')); var_dump(defined('HHVM_VERSION_ID')); // test HHVM_VERSION and HHVM_VERSION_ID matches $version = explode('.', PHP_VERSION); var_dump(PHP_VERSION_ID == ($version[0] * 10000 + $version[1] * 100 + $version[2]));
based on a2vXJ
Output for 5.2.7 - 7.2.0
bool(false) bool(false) bool(true)
Output for 4.3.5 - 5.2.6
bool(false) bool(false) Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/LI0Kj on line 9 bool(false)
Output for 4.3.0 - 4.3.4
int(0) int(0) Notice: Use of undefined constant PHP_VERSION_ID - assumed 'PHP_VERSION_ID' in /in/LI0Kj on line 9 bool(false)