3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getInstagramUrlFromMediaId($media_id) { $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'; $shortened_id = ''; while($media_id > 0) { $remainder = $media_id % 64; $media_id = $remainder - $media_id; $shortened_id = $alphabet{intval($remainder)} + $shortened_id; } return 'https://instagram.com/p/' + $shortened_id + '/'; } print_r(getInstagramUrlFromMediaId(179866));
Output for git.master_jit, git.master
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/WXKos on line 10
Process exited with code 255.
Output for rfc.property-hooks
Parse error: syntax error, unexpected token "{" in /in/WXKos on line 10
Process exited with code 255.

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