3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(defined('HHVM_VERSION')); var_dump(defined('HHVM_VERSION_ID')); var_dump(is_int(HHVM_VERSION_ID)); // test HHVM_VERSION and HHVM_VERSION_ID matches $version = explode('.', HHVM_VERSION); if (HHVM_VERSION_ID == ($version[0] * 10000 + $version[1] * 100 + $version[2])) { echo "HHVM_VERSION matches HHVM_VERSION_ID\n"; } else { echo "HHVM_VERSION does NOT match HHVM_VERSION_ID\n"; }
based on 6YgN9
Output for 7.1.0
bool(false) bool(false) Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 5 bool(false) Notice: Use of undefined constant HHVM_VERSION - assumed 'HHVM_VERSION' in /in/cAMSA on line 8 Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 9 Warning: A non-numeric value encountered in /in/cAMSA on line 9 Notice: Undefined offset: 1 in /in/cAMSA on line 9 Notice: Undefined offset: 2 in /in/cAMSA on line 9 HHVM_VERSION matches HHVM_VERSION_ID
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.0.14
bool(false) bool(false) Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 5 bool(false) Notice: Use of undefined constant HHVM_VERSION - assumed 'HHVM_VERSION' in /in/cAMSA on line 8 Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 9 Notice: Undefined offset: 1 in /in/cAMSA on line 9 Notice: Undefined offset: 2 in /in/cAMSA on line 9 HHVM_VERSION matches HHVM_VERSION_ID
Output for hhvm-3.10.0 - 3.12.0
bool(true) bool(true) bool(true) HHVM_VERSION matches HHVM_VERSION_ID
Output for 4.3.5 - 5.2.17
bool(false) bool(false) Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 5 bool(false) Notice: Use of undefined constant HHVM_VERSION - assumed 'HHVM_VERSION' in /in/cAMSA on line 8 Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 9 Notice: Undefined offset: 1 in /in/cAMSA on line 9 Notice: Undefined offset: 2 in /in/cAMSA on line 9 HHVM_VERSION matches HHVM_VERSION_ID
Output for 4.3.0 - 4.3.4
int(0) int(0) Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 5 bool(false) Notice: Use of undefined constant HHVM_VERSION - assumed 'HHVM_VERSION' in /in/cAMSA on line 8 Notice: Use of undefined constant HHVM_VERSION_ID - assumed 'HHVM_VERSION_ID' in /in/cAMSA on line 9 Notice: Undefined offset: 1 in /in/cAMSA on line 9 Notice: Undefined offset: 2 in /in/cAMSA on line 9 HHVM_VERSION matches HHVM_VERSION_ID