3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 3; $b = 1.55; $c = $a + $b; echo $c . PHP_EOL; // prints 4.55 $d = new \SplFloat(3.00); $e = new \SplFloat(1.55); $f = $d + $e; echo $f . PHP_EOL; // prints 4 (unexpected) $g = new \SplFloat(3.00); $h = new \SplFloat(1.55); $i = (float)$g + (float)$h; echo $i . PHP_EOL; // prints 4.55
Output for git.master, git.master_jit, rfc.property-hooks
4.55 Fatal error: Uncaught Error: Class "SplFloat" not found in /in/tCNIa:7 Stack trace: #0 {main} thrown in /in/tCNIa on line 7
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:
50.91 ms | 401 KiB | 8 Q