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_ECB), MCRYPT_RAND); $data = substr("4afc3e3d-bed1-42fd-85eb-06b8fbbc4925", 0, mcrypt_get_key_size(MCRYPT_RIJNDAEL_256)); $enc = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $data, MCRYPT_MODE_ECB, $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/1hA6v:3 Stack trace: #0 {main} thrown in /in/1hA6v on line 3
Process exited with code 255.
Output for 7.0.5
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 7881aff8cf8d078875605583cfd1dda3a394954610a9526f00b4ddb047d3f17f
Output for 7.0.4
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 4e7f3dd4457c28a5b4453acdce2d6580fdfc33d74953b2e8b877406f12632f78
Output for 7.0.3
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 dc999b25b340ce18c522162eb823bf3899b4dcc4217dfe6a27525a520db610b6
Output for 7.0.2
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 d522186b36849499d9ad415d0af06ba2885a7199fa7a26896e43f1093d74106a
Output for 7.0.1
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 bb9b228d5a0bc0da47296ad18431267da7a58605401a7b59843d16a57be6de2e
Output for 7.0.0
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 b06b270945c731493fe7820f0376a03039f80e23bfed6bb354297207ae0d18a7
Output for 5.5.35, 5.6.21
Fatal error: Call to undefined function mcrypt_create_iv() in /in/1hA6v on line 3
Process exited with code 255.
Output for 5.6.20
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 b677255c5b2290d8e9bfc3ef84672673c5910b855bfc3b370177b06f6d95af59
Output for 5.6.19
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 c657a71a828fbaabf5b93afe9834f9ba97197773dd6a8b66229ac18a8883e0ab
Output for 5.6.18
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 7a23cc45259080b4e3eb23248710d6d48aee4d66dbacdc829103079353260a35
Output for 5.6.17
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 5ac020b08c5f3e3df72355285a6875d9592558e01839b29e515a1aad9ad18ea8
Output for 5.6.16
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 3911111efa1a793899e797904f999fef49fbf6fc7c164ad2c642675cd1714b1b
Output for 5.6.15
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 17b798ad69a8b36292cf71425ce9f61d041fd5a55cef268d2dbc0546b4d50268
Output for 5.6.14
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 44edb65ec3285855ef8eb41bcfa463cf55ed153ea7ac61cfa2d885402042b4e5
Output for 5.6.13
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 e7e19f8cabfcb60ca06cb1daaabdd76c9e16ec276d9f0e5e00898084f563495a
Output for 5.6.12
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 df8fedfe59e0943dd6d18275a43ae0f02509db17117c167ac53daa2023fdf3df
Output for 5.6.11
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 0ef0ea221a4b4044583bd6cfa682525004698a8f74591d6fe3c94ba4da258aea
Output for 5.6.10
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 8893c98147b19f2b10bbdbeeccdd6ff0d0cbd33d63425c95c78b90f9b3249c07
Output for 5.6.9
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 bdf3b3c2b609fd90ea34822fe24c59eaf84c720e45f80f2e439a17cf4bbed7fa
Output for 5.6.8
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Key of size 36 not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported in /in/1hA6v on line 5 317602cb1d1137ad87ad84e8f7f147fa72961c3948da8059efddb9000547c964
Output for 5.5.34
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 f33b0e14be6bce8fc39b20ca25067ed75b51d2fd9c93fe5081fd154157dd99de c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.33
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 a1629d15076becdaaf73f10d713515752920cd81fa70a23b8376356ed256258b c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.32
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 bb54f150ca7937766801fa1601166ff5cf0bc60b2f8b1945beb46a36ec99ae6a c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.31
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 becbb071805dbea21326184c05f15360d2e3a38f857b8ae6515f4be62ca1aa4d c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.30
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 2de2b58f247f20d9288851266c46b589679ca5d822bcfd89b0633d490508969d c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.29
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 93e2059ef4d065cdfbd86e1efeeb51c769fded44facb24785233fa152575c5f3 c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.28
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 e0a04392d10fe93c066d4dd5e8f03aaedb5be69afcee246846dbef334b1f204e c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.27
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 bbb5a99516d0c10313a737cbef7ef313995d3f8a5df8323c4c368db5dee79d26 c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.26
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 d4b928a694e931b795b9b17c0ce04de9d7fdc81d77e6303780d5718d3ad1a92e c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.25
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 e6735dcb9e082025dcf8643388e8bab3c3fc10c8f61d04cf436c9ff31aceda1a c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92
Output for 5.5.24
Warning: mcrypt_get_key_size() expects exactly 2 parameters, 1 given in /in/1hA6v on line 4 Warning: mcrypt_encrypt(): Size of key is too large for this algorithm in /in/1hA6v on line 5 6da5068f3c2766ea404a1b7d51c2cb24d8b0be3753a59f4a79862f192d1d33dc c63b8e4be476af94191d0843e2110eb68eb86ec8381d8540cc2cbf28f2a65e92

preferences:
203.88 ms | 402 KiB | 212 Q