3v4l.org

run code in 200+ php & hhvm versions
<?php function base64_encode_url($string) { return str_replace(['+','/','='], ['-','_',''], base64_encode($string)); } function base64_decode_url($string) { return base64_decode(str_replace(['-','_'], ['+','/'], $string)); } for ($i=0; $i<20000; $i++) { $data = random_bytes(rand(12,20)); if (base64_decode_url(base64_encode($data)) !== $data) { echo "FAIL"; } } echo "OK";
based on 9TR6J

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master+jit
OK
Output for branch php-master
OK
Output for Typed properties v2
OK
Output for Arrow functions
OK
Output for Object typehint
OK
Output for Array change keys
OK
Output for Lexical anon
Fatal error: Call to undefined function random_bytes() in /in/aEs4o on line 12
Process exited with code 255.

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