3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 71 => 72, 33.1 => 34, 20.8 => 22]; foreach($tests as $test => $expected) { $num = ceil($test); if($num % 2 == 1) $num++; echo "Expected: $expected, Actual: $num\n"; }
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 33.1 to int loses precision in /in/9YBm9 on line 3 Deprecated: Implicit conversion from float 20.8 to int loses precision in /in/9YBm9 on line 3 Expected: 72, Actual: 72 Expected: 34, Actual: 34 Expected: 22, Actual: 20

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:
38.64 ms | 401 KiB | 8 Q