3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time = microtime(true); $data = md5(substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, rand(1,10))); $keyhash = md5('secret key'); $ivsize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($ivsize, MCRYPT_DEV_URANDOM); $cipherdata = ''; for ($i = 0; $i < 2500; $i += 1) { // XOR $cipherdata ^= mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $keyhash, $data, MCRYPT_MODE_CBC, $iv); } $time = microtime(true) - $time; echo 'array_diff() took ' . number_format($time, 3) . ' seconds'.PHP_EOL;
Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.23, 7.2.0 - 7.2.11
Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/58hZB:6 Stack trace: #0 {main} thrown in /in/58hZB on line 6
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.38
Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/58hZB on line 6
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: mcrypt_get_iv_size() in /in/58hZB on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: mcrypt_get_iv_size() in /in/58hZB on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: mcrypt_get_iv_size() in /in/58hZB on line 6

preferences:
194.27 ms | 401 KiB | 280 Q