3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check(float $value){ $value < 0.001 or $value > 1000.0 and throw new \InvalidArgumentException( 'FairnessWeight must be in the range [0.001, 1000].', ); } $values = [0.0, 1000.0, -1.0, 1010.0]; foreach($values as $v) { echo "Checking value: {$v}:\t"; try { check($v); echo "all good. \n"; } catch (\Throwable $e) { echo "failed! {$e->getMessage()}\n"; } }
Output for git.master_jit, git.master
Checking value: 0: all good. Checking value: 1000: all good. Checking value: -1: all good. Checking value: 1010: failed! FairnessWeight must be in the range [0.001, 1000].

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:
59.21 ms | 709 KiB | 4 Q