3v4l.org

run code in 300+ PHP versions simultaneously
<?php $diffs = []; $unexpectedTraditional = $unexpectedNew = 0; foreach (range(1, 99999) as $i) { $float = $i / 100; $multiple1 = $float * 100; $multiple2 = (float) (string) ($float * 100); $int1 = (int) $multiple1; $int2 = (int) $multiple2; if ($int1 !== $int2) { $diffs[] = $i; if ($int1 !== $i) { $unexpectedTraditional++; } if ($int2 !== $i) { $unexpectedNew++; } } } echo 'Unexpected count traditional approach: '.$unexpectedTraditional."\n"; echo 'Unexpected count new approach: '.$unexpectedNew."\n"; //echo 'Differences for:'."\n"; //var_dump($diffs);
Output for git.master, git.master_jit, rfc.property-hooks
Unexpected count traditional approach: 4586 Unexpected count new approach: 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:
59.67 ms | 401 KiB | 8 Q