3v4l.org

run code in 300+ PHP versions simultaneously
<?php $base64 = 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+'; echo 'plain: ', substr($string = base64_decode($base64), 0, 16), "\n"; echo bin2hex(substr($string, 0, 16)), "\n"; $uri = 'image/png;base64,' . $base64; $string = file_get_contents('data:' . $uri); echo 'no slashes: '; echo substr($string, 0, 16), "\n"; echo bin2hex(substr($string, 0, 16)), "\n"; echo 'with slashes: '; $string = file_get_contents('data://' . $uri); echo substr($string, 0, 16), "\n"; echo bin2hex(substr($string, 0, 16)), "\n";
Output for git.master, git.master_jit, rfc.property-hooks
plain: �PNG  IHDR 89504e470d0a1a0a0000000d49484452 no slashes: �PNG  IHDR 89504e470d0a1a0a0000000d49484452 with slashes: �PNG  IHDR 89504e470d0a1a0a0000000d49484452

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