3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(version_compare('3.7.5', '3.7.0', 'ge')); // true, OK var_dump(version_compare('3.7.5', '3.7.0', ' ')); // null, should throw invalid argument exception at best var_dump(version_compare('3.7.5', '3.7.0', ' ge')); // null, should throw invalid argument exception at best var_dump(version_compare('3.7.5', '3.7.0', 'ge ')); // null, should throw invalid argument exception at best var_dump(version_compare('3.7.5', '3.7.0', 'invalid')); // null, should throw invalid argument exception at best
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) Fatal error: Uncaught ValueError: version_compare(): Argument #3 ($operator) must be a valid comparison operator in /in/CrO0J:4 Stack trace: #0 /in/CrO0J(4): version_compare('3.7.5', '3.7.0', ' ') #1 {main} thrown in /in/CrO0J on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
120.71 ms | 406 KiB | 5 Q