3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $email = htmlentities('cal@gmail.com', ENT_QUOTES); $private_key = '6KzVA_2qy'; //possible de la changer function f_crypt($private_key, $str_to_crypt) { $private_key = md5($private_key); $letter = -1; $new_str = ''; $strlen = strlen($str_to_crypt); for ($i = 0; $i < $strlen; $i++) { $letter++; if ($letter > 31) { $letter = 0; } $neword = ord($str_to_crypt{$i}) + ord($private_key{$letter}); if ($neword > 255) { $neword -= 256; } $new_str .= chr($neword); } return base64_url_encode($new_str); } f_crypt($private_key, $email);
based on b9C5v
Output for 7.0.0 - 7.2.6
Fatal error: Uncaught Error: Call to undefined function base64_url_encode() in /in/4g27W:23 Stack trace: #0 /in/4g27W(28): f_crypt('061807151ceb81d...', 'cal@gmail.com') #1 {main} thrown in /in/4g27W on line 23
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Call to undefined function base64_url_encode() in /in/4g27W:23 Stack trace: #0 /in/4g27W(28): f_crypt() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to undefined function base64_url_encode() in /in/4g27W on line 23
Process exited with code 255.