3v4l.org

run code in 300+ PHP versions simultaneously
<?php $k=0.1+0.7; var_dump($k); //return 0.8 var_dump(0.8 == $k); //return false $res = (string)$k - json_encode($k); print($res."\n\n"); //return 1.1102230246252E-16 ini_set('precision', '-1'); $k=0.1+0.7; var_dump($k); //return 0.7999999999999999 var_dump(0.8 == $k); //return false $res = (string)$k - json_encode($k); print($res); //return 0
Output for git.master, git.master_jit, rfc.property-hooks
float(0.7999999999999999) bool(false) 1.1102230246252E-16 float(0.7999999999999999) bool(false) 0

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