3v4l.org

run code in 300+ PHP versions simultaneously
<?php $checksum = crc32("The quick brown fox jumped over the lazy dog."); $outstring = ''; $l = strlen($data); for ($i = 0; $i < $l; $i += 8) { $chunk = substr($data, $i, 8); $outlen = ceil((strlen($chunk) * 8)/6); //8bit/char in, 6bits/char out, round up $x = bin2hex($chunk); //gmp won't convert from binary, so go via hex $w = gmp_strval(gmp_init(ltrim($x, '0'), 16), 62); //gmp doesn't like leading 0s $pad = str_pad($w, $outlen, '0', STR_PAD_LEFT); $outstring .= $pad; } echo $outstring; printf("%u\n", $checksum);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $data in /in/CoY5T on line 6 Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /in/CoY5T on line 6 2191738434

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