3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(0.1 + 0.7 === 0.8); // bool(false) var_dump((0.1 + 0.7) * 10); // float(7.999999999999999) var_dump((int) ((0.1 + 0.7) * 10)); // int(7) <- The classic! // It hides well, too: echo 0.1 + 0.2.\PHP_EOL; // 0.3 <- The float value will be coerced to string. printf("%.20f\n", 0.1 + 0.2); // 0.30000000000000004441
Output for git.master, git.master_jit
bool(false) float(7.999999999999999) int(7) 0.3 0.30000000000000004441

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:
47.93 ms | 782 KiB | 4 Q