3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputs = [ -1, "-1", -0.9, "-0.9", 0, "0", 0.0, "0.0", .9, ".9", 1, "1.0", 1.1, "1.1", 2, "2", ]; foreach ($inputs as $input) { $ok = filter_var($input, FILTER_VALIDATE_INT, [ 'options' => [ 'min_range' => 1, 'max_range' => PHP_INT_MAX ]]); var_dump([ $input, $ok ]); }
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> int(-1) [1]=> bool(false) } array(2) { [0]=> string(2) "-1" [1]=> bool(false) } array(2) { [0]=> float(-0.9) [1]=> bool(false) } array(2) { [0]=> string(4) "-0.9" [1]=> bool(false) } array(2) { [0]=> int(0) [1]=> bool(false) } array(2) { [0]=> string(1) "0" [1]=> bool(false) } array(2) { [0]=> float(0) [1]=> bool(false) } array(2) { [0]=> string(3) "0.0" [1]=> bool(false) } array(2) { [0]=> float(0.9) [1]=> bool(false) } array(2) { [0]=> string(2) ".9" [1]=> bool(false) } array(2) { [0]=> int(1) [1]=> int(1) } array(2) { [0]=> string(3) "1.0" [1]=> bool(false) } array(2) { [0]=> float(1.1) [1]=> bool(false) } array(2) { [0]=> string(3) "1.1" [1]=> bool(false) } array(2) { [0]=> int(2) [1]=> int(2) } array(2) { [0]=> string(1) "2" [1]=> int(2) }

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:
27.01 ms | 408 KiB | 5 Q