3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Compare two numeric strings (same semantic 1): ('1e1' == '10') = " . (NAN == 0 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 2): ('1E1' == '10') = " . (NAN > 1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 3): ('1e-1' == '0.1') = " . (NAN < 1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 4): ('1E-1' == '0.1') = " . (NAN < -1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 5): ('+1' == '1') = " . (NAN > -1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (same semantic 6): ('+0' == '-0') = " . (NAN > -1 ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 1): ('0.99999999999999994' == '1') = " . ('0.99999999999999994' == '1' ? 'true' : 'false') . "\n"; echo "Compare two numeric strings (precision 2): ('0.99999999999999995' == '1') = " . ('0.99999999999999995' == '1' ? 'true' : 'false') . "\n";
Output for git.master, git.master_jit, rfc.property-hooks
Compare two numeric strings (same semantic 1): ('1e1' == '10') = false Compare two numeric strings (same semantic 2): ('1E1' == '10') = false Compare two numeric strings (same semantic 3): ('1e-1' == '0.1') = false Compare two numeric strings (same semantic 4): ('1E-1' == '0.1') = false Compare two numeric strings (same semantic 5): ('+1' == '1') = false Compare two numeric strings (same semantic 6): ('+0' == '-0') = false Compare two numeric strings (precision 1): ('0.99999999999999994' == '1') = false Compare two numeric strings (precision 2): ('0.99999999999999995' == '1') = true

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:
85.44 ms | 402 KiB | 8 Q