3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = "8d30f9d3-083b-4ce0-b196-7364b2c3e2ef"; $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC), MCRYPT_RAND); $data = substr("4afc3e3d-bed1-42fd-85eb-06b8fbbc4925", 0, mcrypt_get_key_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC)); $enc = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_CBC, $iv); echo bin2hex($iv)."\n"; echo bin2hex($enc)."\n";
Output for 7.0.6 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Call to undefined function mcrypt_create_iv() in /in/g6MK5:3 Stack trace: #0 {main} thrown in /in/g6MK5 on line 3
Process exited with code 255.
Output for 7.0.5
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 a9a2389bb5a06693a029674eee3d24a8aa2d9ff124f79739f4493ccb6f5b240e
Output for 7.0.4
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 46d04cbd64202e2a634fc709c7dcfb49eb50f83a3d2bd42d4ead97e2a53f1688
Output for 7.0.3
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 3d87831a5798faa83d8f3d280979521e493a464e442cafe68927667931eed423
Output for 7.0.2
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 7c2b5e36e2da82c4da8e7eaf5ac1233e274b04d8fb2aae44430fe8a6f90fc146
Output for 7.0.1
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 3783a7c8bf352d23b72c02eb6c204e8ef1cd5b2dea546d024aa78a9d9ecd256d
Output for 7.0.0
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 875d8f16a356de0e13c241caa49248e0fc30a226af9cabe12ee518d6d4c37470
Output for 5.5.35, 5.6.21 - 5.6.28
Fatal error: Call to undefined function mcrypt_create_iv() in /in/g6MK5 on line 3
Process exited with code 255.
Output for 5.6.20
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 c7b7bec45aaf01520ba93b15b1c99b8cb14a9fb52ea41db893a22017cc17f702
Output for 5.6.19
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 9d0c5fb13a78ba25481c5332d825cd7301e73a3602b8e782b975799062e428eb
Output for 5.6.18
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 37f33e171cdfe63dd4bbaa7e374bf2e01d730c5f10a8596f144c72645a92491f
Output for 5.6.17
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 7ef56ba85edcb194bb467c6f12bea47d1ffd01b7f03c5546b06a127e4f2afbd4
Output for 5.6.16
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 1446b1e48aa9aca5298ec9d0a1a477c1d48e6708547d697caf093409d7dc672f
Output for 5.6.15
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 bf66631dce030cdaf8a15796fa97f9cf8a23e48b6b49267ba2e10a95383e0ea2
Output for 5.6.14
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 172a34fda19f69bad3b695bdf027414b310eef839d751535019d1610b841b118
Output for 5.6.13
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 b74ca7d0e2cc4721b807eca74642230f33d5a7b79f6acb6a6ccbbd98d684cee6
Output for 5.6.12
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 04632162e870b21f6f82642371aa84ea1b3e5706be51b3ab0c1a41a41864b2a0
Output for 5.6.11
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 ed51384f0ee7502e4efeba6733f6ded843bc64327fcf5dfac4f2ed44987e929e
Output for 5.6.10
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 1bb4f17275353ed90c15b5746834ad59da8d39e31f6716c78d10d315ac9617a8
Output for 5.6.9
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 203fca84fbb4fcea1316e64f38d751cbbc5f986508c12eea23c12f2f4463d59b
Output for 5.6.8
Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/g6MK5 on line 5 8aef5c8607e285f3c2b20b7077bac87e9242b5447f3527096bc0229291dc4f04
Output for 5.5.34
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 85162e04c862d7f5714142b55fa00bdfe0110530214f0685c72e48f63475eb80 8ae89f5507320790afe5cf9a376c3b44d542afe3455cb2ac3546444a6996437d
Output for 5.5.33
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 2631f07975946819005ce68f1a697289655948c4225113b75bfc593f9b0841ab 7a23bf3734ee53f73ff3ed70fd10f8c5e08579b0c0e9fa9957ed9de87279a340
Output for 5.5.32
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 874d1ddac90dcac9b95248aa7b31baae825f448bc1cc16d341f3508eb4d933ac aa2cde08858699e82dd4d16db5cf196f5a8b8971c92609e82b61db8d0a0cd08a
Output for 5.5.31
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 92c7111436bae3fa609e3217023d92131a725500a7a4cb78a45f9dc292e0e67d 474121153d672ab5a093d56076edc8b62714970f65b4db66d0b8b9f1b92f2518
Output for 5.5.30
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 f7e39870a69bb8dfb8281de5f6d9a5585f8f1f53ce205afe4c397373aa5dce86 d3f91c79185f3e18db5ed057af083a5710c468c79784649aac31993f5ca49145
Output for 5.5.29
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 9b4e3febf76b525e26267bb33497165ae191eaf66b47f5e4d29237a79048cbaf 6f45a6bdaa44ec71d189d349b41bab70d82b56a0d212177bd393cd8a733a11cc
Output for 5.5.28
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 6a521d2c3131caa61d718f7c1441c7718e8c03d4d7237905de8a0ff3a779873e 947a66eae7b3ebd709d3991761df66c3c724a630a959cbc3323fadc6f6285b77
Output for 5.5.27
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 52da38cb340280e93b8f25be035ce1839678166570e2b65be398b1a2a4373585 0771a8e268e6cfd676eda748132203516501d5a100335598526476cdc7cb78b7
Output for 5.5.26
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 8f3793d4d3bf8577e8f2081a9e2d303e1884548f6fa5dd1309d83a781ee548ba 24c794160bfa2f6db4d49f3aa99c6cd0afda96601f9bdf3f374973f1a774c0c8
Output for 5.5.25
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 3d6ae8b78138fc6a6d586fc28099745e7db890a778b97692cf070ac6082e2a85 85b2942acff7c6733f901ad9312554530d5758f8ce96f021c01241a9aafbf0b8
Output for 5.5.24
Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/g6MK5 on line 5 38e036fea1c913956600228a5cd6e93f939b2d37ef4434f056a586f6620b5c39 86dc508298cd7ff6bec58c1a4121265fefa956e80073516b6bd24733dc0a2117

preferences:
166.41 ms | 401 KiB | 213 Q