3v4l.org

run code in 300+ PHP versions simultaneously
<?php $centesimas = 598322.3; var_dump(intval($centesimas)== $centesimas); $token = '9b81b2'; $key = 'CualquierCosa'; echo $descifrado = bin2hex(openssl_encrypt($token, "AES-128-ECB", $key, OPENSSL_RAW_DATA)); echo PHP_EOL; echo openssl_error_string(); $tokenBD = '6f79ca09cf1267f02bd6e9179e112a2d'; $tokenCifrado = hex2bin($tokenBD); $token = openssl_decrypt($tokenCifrado, "AES-128-ECB", $key, OPENSSL_RAW_DATA); echo openssl_error_string(); echo $tokenBD.PHP_EOL; echo $descifrado; var_dump($tokenBD == $descifrado);
Output for 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
bool(false) Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/lWFof:7 Stack trace: #0 {main} thrown in /in/lWFof on line 7
Process exited with code 255.

preferences:
42.72 ms | 406 KiB | 5 Q