3v4l.org

run code in 500+ PHP versions simultaneously
<?php $one = 3 * 0.333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333; var_dump($one); // float(1) var_dump(1 === $one); $float = 1 / 3 * 3; var_dump( $float ); $int = 3 / 3; var_dump( $int ); print ini_get('precision').PHP_EOL; // 14 three -------------- $notOne = 3 * 0.33333333333333; print $notOne; ?>
Output for git.master, git.master_jit
float(1) bool(false) float(1) int(1) 14 0.99999999999999

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:
39.36 ms | 526 KiB | 4 Q