3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Wrongly-encoded garbage, but base64_decode() will try anyway. $bad = 'ABC123!@#$%'; $out = base64_decode($bad); if ($out === FALSE) { echo 'Failed without true as second parameter.'.PHP_EOL; } else { $len = strlen($out); for ($i = 0;$i < $len;$i++) { echo ord($out[$i]).' '; } echo PHP_EOL; } // You need to pass TRUE as a second parameter in order to make it fail loudly $out2 = base64_decode($bad, TRUE); if ($out2 === FALSE) { echo 'Failed with true as second parameter.'.PHP_EOL; } else { $len = strlen($out); for ($i = 0;$i < $len;$i++) { echo ord($out[$i]).' '; } echo PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
0 16 181 219 Failed with true as second parameter.

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