3v4l.org

run code in 300+ PHP versions simultaneously
<?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); } ECHO f_crypt($private_key, $email);
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/b9C5v on line 17
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/b9C5v on line 17
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/b9C5v on line 17 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/b9C5v on line 17 Fatal error: Uncaught Error: Call to undefined function base64_url_encode() in /in/b9C5v:23 Stack trace: #0 /in/b9C5v(28): f_crypt('061807151ceb81d...', 'cal@gmail.com') #1 {main} thrown in /in/b9C5v on line 23
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33
Fatal error: Uncaught Error: Call to undefined function base64_url_encode() in /in/b9C5v:23 Stack trace: #0 /in/b9C5v(28): f_crypt('061807151ceb81d...', 'cal@gmail.com') #1 {main} thrown in /in/b9C5v on line 23
Process exited with code 255.
Output for 5.6.38
Fatal error: Call to undefined function base64_url_encode() in /in/b9C5v on line 23
Process exited with code 255.

preferences:
185.29 ms | 401 KiB | 217 Q