3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'test'; $key = openssl_random_pseudo_bytes(16); $iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH_COMPAT, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $cipher = mcrypt_encrypt( MCRYPT_BLOWFISH_COMPAT, $key, $message, MCRYPT_MODE_ECB, $iv ); $plain = openssl_decrypt( $cipher, 'BF-ECB', $key, OPENSSL_RAW_DATA||OPENSSL_ZERO_PADDING, $iv ); var_dump( $message, bin2hex($cipher), $plain, mb_strlen($message, '8bit'), mb_strlen($plain, '8bit'), $message === $plain );
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.33, 7.4.3 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/D4Kn0:3 Stack trace: #0 {main} thrown in /in/D4Kn0 on line 3
Process exited with code 255.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.8
Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/D4Kn0:4 Stack trace: #0 {main} thrown in /in/D4Kn0 on line 4
Process exited with code 255.
Output for 5.5.35 - 5.5.38, 5.6.0 - 5.6.30
Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/D4Kn0 on line 4
Process exited with code 255.
Output for 5.5.34
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "4ebb0ff51a12aa3b" bool(false) int(4) int(0) bool(false)
Output for 5.5.33
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "5645d7d83c45bbd5" bool(false) int(4) int(0) bool(false)
Output for 5.5.32
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "1edfcc171d3d1495" bool(false) int(4) int(0) bool(false)
Output for 5.5.31
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "d724243faee0593a" bool(false) int(4) int(0) bool(false)
Output for 5.5.30
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "6aeb371d31a3959c" bool(false) int(4) int(0) bool(false)
Output for 5.5.29
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "faee18f91e2f568b" bool(false) int(4) int(0) bool(false)
Output for 5.5.28
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "a9e7099c227107c8" bool(false) int(4) int(0) bool(false)
Output for 5.5.27
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "9da89a2c13320056" bool(false) int(4) int(0) bool(false)
Output for 5.5.26
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "a2d622ba2697ed90" bool(false) int(4) int(0) bool(false)
Output for 5.5.25
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "95369060f276634c" bool(false) int(4) int(0) bool(false)
Output for 5.5.24
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "19d79d04aed6399a" bool(false) int(4) int(0) bool(false)
Output for 5.5.23
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "7052c516ffa85620" bool(false) int(4) int(0) bool(false)
Output for 5.5.22
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "074efba6ed37e047" bool(false) int(4) int(0) bool(false)
Output for 5.5.21
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "52118099fc580c1c" bool(false) int(4) int(0) bool(false)
Output for 5.5.20
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "c90d8d940eb2db89" bool(false) int(4) int(0) bool(false)
Output for 5.5.19
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "60bd09c4aad39887" bool(false) int(4) int(0) bool(false)
Output for 5.5.18
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "a96fa9c70dbf5df1" bool(false) int(4) int(0) bool(false)
Output for 5.5.16
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "1a429ed01e2cd9cb" bool(false) int(4) int(0) bool(false)
Output for 5.5.15
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "dca60e99f0de7149" bool(false) int(4) int(0) bool(false)
Output for 5.5.14
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "c1e314feb452ff0d" bool(false) int(4) int(0) bool(false)
Output for 5.5.13
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "f45f126f16119dc1" bool(false) int(4) int(0) bool(false)
Output for 5.5.12
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "4f91385ce34c8df4" bool(false) int(4) int(0) bool(false)
Output for 5.5.11
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "474abf5beeee3cad" bool(false) int(4) int(0) bool(false)
Output for 5.5.10
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "902e69493702f2f8" bool(false) int(4) int(0) bool(false)
Output for 5.5.9
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "5ae81a74bce3873b" bool(false) int(4) int(0) bool(false)
Output for 5.5.8
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "64d42537d02167c9" bool(false) int(4) int(0) bool(false)
Output for 5.5.7
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "d2bb08cfa5938988" bool(false) int(4) int(0) bool(false)
Output for 5.5.6
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "e4e0923b0a483287" bool(false) int(4) int(0) bool(false)
Output for 5.5.5
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "f5f8401863d305c7" bool(false) int(4) int(0) bool(false)
Output for 5.5.4
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "8d7d2414333bcce1" bool(false) int(4) int(0) bool(false)
Output for 5.5.3
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "fa2ce63f2e677ba2" bool(false) int(4) int(0) bool(false)
Output for 5.5.2
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "5af2d6f34f269971" bool(false) int(4) int(0) bool(false)
Output for 5.5.1
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "0fbe6319f8bfa6c3" bool(false) int(4) int(0) bool(false)
Output for 5.5.0
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "38148949ecd01272" bool(false) int(4) int(0) bool(false)
Output for 5.4.45
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "96ee757f4927e6a2" bool(false) int(4) int(0) bool(false)
Output for 5.4.44
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "59c567a902633c16" bool(false) int(4) int(0) bool(false)
Output for 5.4.43
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "a0b47abca9a528fc" bool(false) int(4) int(0) bool(false)
Output for 5.4.42
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "5996e7e203fc4cbb" bool(false) int(4) int(0) bool(false)
Output for 5.4.41
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "1efe9ce0e6f7b195" bool(false) int(4) int(0) bool(false)
Output for 5.4.40
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "e1afbdd3f885a475" bool(false) int(4) int(0) bool(false)
Output for 5.4.39
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "665ffa05be767d39" bool(false) int(4) int(0) bool(false)
Output for 5.4.38
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "15650a9acd589c2f" bool(false) int(4) int(0) bool(false)
Output for 5.4.37
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "c1847095f0f5af21" bool(false) int(4) int(0) bool(false)
Output for 5.4.36
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "9c24e2ffc54b0188" bool(false) int(4) int(0) bool(false)
Output for 5.4.35
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "fa6b75335e1ed8e2" bool(false) int(4) int(0) bool(false)
Output for 5.4.34
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "d4255284af274332" bool(false) int(4) int(0) bool(false)
Output for 5.4.32
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "c3f6fbd70c30e805" bool(false) int(4) int(0) bool(false)
Output for 5.4.31
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "53ee7fe7992f98c0" bool(false) int(4) int(0) bool(false)
Output for 5.4.30
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "93aed9dba531412b" bool(false) int(4) int(0) bool(false)
Output for 5.4.29
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "357ec30b4f0abacb" bool(false) int(4) int(0) bool(false)
Output for 5.4.28
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "9a236c1860113976" bool(false) int(4) int(0) bool(false)
Output for 5.4.27
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "6625fe86aa6494c1" bool(false) int(4) int(0) bool(false)
Output for 5.4.26
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "2b02116be235309e" bool(false) int(4) int(0) bool(false)
Output for 5.4.25
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "d511f625b63a6e29" bool(false) int(4) int(0) bool(false)
Output for 5.4.24
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "32a874bbfd9c8099" bool(false) int(4) int(0) bool(false)
Output for 5.4.23
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "ef3157c4ac91ef78" bool(false) int(4) int(0) bool(false)
Output for 5.4.22
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "e45a93f8b0b5cee9" bool(false) int(4) int(0) bool(false)
Output for 5.4.21
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "9b268e2fff1a7102" bool(false) int(4) int(0) bool(false)
Output for 5.4.20
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "1b059de0096096b5" bool(false) int(4) int(0) bool(false)
Output for 5.4.19
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "56bc5f3bb8a86764" bool(false) int(4) int(0) bool(false)
Output for 5.4.18
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "952801e915720513" bool(false) int(4) int(0) bool(false)
Output for 5.4.17
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "d7665f916f41910d" bool(false) int(4) int(0) bool(false)
Output for 5.4.16
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "718e99243e49512b" bool(false) int(4) int(0) bool(false)
Output for 5.4.15
Warning: openssl_decrypt(): IV passed is 8 bytes long which is longer than the 0 expected by selected cipher, truncating in /in/D4Kn0 on line 21 string(4) "test" string(16) "63ad94f75f4a03b6" bool(false) int(4) int(0) bool(false)
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.14
Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/D4Kn0 on line 3
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/D4Kn0 on line 3
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: openssl_random_pseudo_bytes() in /in/D4Kn0 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: openssl_random_pseudo_bytes() in /in/D4Kn0 on line 3

preferences:
183.87 ms | 525 KiB | 5 Q