3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(4.22/0.01 == (int)(4.22/0.01)); // false var_dump([ '4.22*(1/0.01)' => 4.22*(1/0.01), '4.22/0.01' => 4.22/0.01, '(int)(4.22/0.01)' => (int)(4.22/0.01), '(int)(string)(4.22/0.01)' => (int)(string)(4.22/0.01) ]); var_dump(4.22*(1/0.01) == (int)(4.22*(1/0.01))); // true var_dump((string)(4.22/0.01) == (int)(string)(4.22/0.01)); // true var_dump(round(4.22/0.01, 4) == (int)round(4.22/0.01, 4)); // true var_dump(bcdiv((string)4.22,(string)0.01, 10));
Output for git.master, git.master_jit, rfc.property-hooks
bool(false) array(4) { ["4.22*(1/0.01)"]=> float(422) ["4.22/0.01"]=> float(421.99999999999994) ["(int)(4.22/0.01)"]=> int(421) ["(int)(string)(4.22/0.01)"]=> int(422) } bool(true) bool(true) bool(true) string(14) "422.0000000000"

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:
26.93 ms | 406 KiB | 5 Q