3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(version_compare('10.0.', '10', '>=')); var_dump(version_compare('9.9.0', '10', '>=')); var_dump(version_compare('9', '10', '>=')); var_dump(version_compare('10.0.1', '10', '>=')); switch ('sqlsrv') { case 'mysql': echo "INSERT INTO"; case 'oci': // DUAL is Oracle specific dummy table echo "MERGE INTO"; case 'sqlsrv' && version_compare('10.0', '10', '>='): // MS SQL Server requires MERGE be terminated by semicolon echo "MERGE"; case 'sqlite': echo "INSERT"; }
Output for 4.3.0 - 7.1.0
bool(true) bool(false) bool(false) bool(true) MERGEINSERT