3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = 'test'; $key = openssl_random_pseudo_bytes(16); $iv = openssl_random_pseudo_bytes(16); $cipher = mcrypt_encrypt( MCRYPT_RIJNDAEL_128, $key, $message, MCRYPT_MODE_CBC, $iv ); $plain = openssl_decrypt( $cipher, 'aes-128-cbc', $key, OPENSSL_RAW_DATA, $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.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/jr68f:3 Stack trace: #0 {main} thrown in /in/jr68f on line 3
Process exited with code 255.
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0
Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/jr68f:6 Stack trace: #0 {main} thrown in /in/jr68f on line 6
Process exited with code 255.
Output for 5.5.35 - 5.5.38, 5.6.0 - 5.6.28
Fatal error: Call to undefined function mcrypt_encrypt() in /in/jr68f on line 6
Process exited with code 255.
Output for 5.5.34
string(4) "test" string(32) "006142f967bb68caeb3e59d3f679c389" bool(false) int(4) int(0) bool(false)
Output for 5.5.33
string(4) "test" string(32) "65f75849eb6ebc9b3d91be45e795ede9" bool(false) int(4) int(0) bool(false)
Output for 5.5.32
string(4) "test" string(32) "3c5589989d62551c75ca5dff77ac157f" bool(false) int(4) int(0) bool(false)
Output for 5.5.31
string(4) "test" string(32) "287bd6e3caa68600747a66f8896aa296" bool(false) int(4) int(0) bool(false)
Output for 5.5.30
string(4) "test" string(32) "29a2f3a9fe049511cafc2573b016f82b" bool(false) int(4) int(0) bool(false)
Output for 5.5.29
string(4) "test" string(32) "312d1ecb9eb880539ac805c8e239679d" bool(false) int(4) int(0) bool(false)
Output for 5.5.28
string(4) "test" string(32) "2bdcebd9586f3dea58f7c1ac044f618c" bool(false) int(4) int(0) bool(false)
Output for 5.5.27
string(4) "test" string(32) "c830165f9d8b68bfea387d665403d7d3" bool(false) int(4) int(0) bool(false)
Output for 5.5.26
string(4) "test" string(32) "e6dceb15151a7d30bb51753a4ac2e462" bool(false) int(4) int(0) bool(false)
Output for 5.5.25
string(4) "test" string(32) "41a2714b6e193b52c795e2e73e632069" bool(false) int(4) int(0) bool(false)
Output for 5.5.24
string(4) "test" string(32) "cfcacb62ccd0c9bec29ebea00b3bd034" bool(false) int(4) int(0) bool(false)
Output for 5.5.23
string(4) "test" string(32) "0e911b43eebf059c84b6b38c98b65707" bool(false) int(4) int(0) bool(false)
Output for 5.5.22
string(4) "test" string(32) "99a215b1a1e21b9d26bc3e34fe976608" bool(false) int(4) int(0) bool(false)
Output for 5.5.21
string(4) "test" string(32) "631a35d33d7750acdcc8045b96461c2a" bool(false) int(4) int(0) bool(false)
Output for 5.5.20
string(4) "test" string(32) "68cf0508878493b1b5a05e5b3d9db499" bool(false) int(4) int(0) bool(false)
Output for 5.5.19
string(4) "test" string(32) "8be93681b98d4b7c3b463f3f8168a309" bool(false) int(4) int(0) bool(false)
Output for 5.5.18
string(4) "test" string(32) "e61728be1a8b53d8745fd3fdb7b040b5" bool(false) int(4) int(0) bool(false)
Output for 5.5.16
string(4) "test" string(32) "ec8d8f7a536913e213bb53ed84659064" bool(false) int(4) int(0) bool(false)
Output for 5.5.15
string(4) "test" string(32) "727ae049f0e9462797d9af81dba0da1d" bool(false) int(4) int(0) bool(false)
Output for 5.5.14
string(4) "test" string(32) "6fcbe8ec4915625a48cbd8cce2c1d55b" bool(false) int(4) int(0) bool(false)
Output for 5.5.13
string(4) "test" string(32) "74ee53c7889498d54615510189805757" bool(false) int(4) int(0) bool(false)
Output for 5.5.12
string(4) "test" string(32) "6018bba25763b780313a89cc73920df8" bool(false) int(4) int(0) bool(false)
Output for 5.5.11
string(4) "test" string(32) "b71ee54fcb9f1437ad08981b83584e38" bool(false) int(4) int(0) bool(false)
Output for 5.5.10
string(4) "test" string(32) "3689d8cea4fe289422df1133126a40ef" bool(false) int(4) int(0) bool(false)
Output for 5.5.9
string(4) "test" string(32) "43c5291beb111eeaa266409436724778" bool(false) int(4) int(0) bool(false)
Output for 5.5.8
string(4) "test" string(32) "e85c67ec4a6f84901207c0f86af3649d" bool(false) int(4) int(0) bool(false)
Output for 5.5.7
string(4) "test" string(32) "40d5c6eef7c40ab03af7871a91b7b154" bool(false) int(4) int(0) bool(false)
Output for 5.5.6
string(4) "test" string(32) "226bef3671692d1e9a14006da2209f29" bool(false) int(4) int(0) bool(false)
Output for 5.5.5
string(4) "test" string(32) "45f30f2cd09031266bfc2ae697496524" bool(false) int(4) int(0) bool(false)
Output for 5.5.4
string(4) "test" string(32) "895c3ef6df47f385350776dfa7624cdb" bool(false) int(4) int(0) bool(false)
Output for 5.5.3
string(4) "test" string(32) "d055c6534e749b24f9c5b124f7ed28d5" bool(false) int(4) int(0) bool(false)
Output for 5.5.2
string(4) "test" string(32) "feefdb7859f6a6457b14b7a75f1effc8" bool(false) int(4) int(0) bool(false)
Output for 5.5.1
string(4) "test" string(32) "0ce90f6ef8423d2090aaf81aff67bd64" bool(false) int(4) int(0) bool(false)
Output for 5.5.0
string(4) "test" string(32) "1717fe0047f8d99c6992f15c04d105bc" bool(false) int(4) int(0) bool(false)
Output for 5.4.45
string(4) "test" string(32) "201bb8cabc06760f7b83f5e429c5c8ec" bool(false) int(4) int(0) bool(false)
Output for 5.4.44
string(4) "test" string(32) "08ff1ba0e1b06e7a153e4b57885fd3f3" bool(false) int(4) int(0) bool(false)
Output for 5.4.43
string(4) "test" string(32) "d44a39724b61b7b2351bdc73d41bc77d" bool(false) int(4) int(0) bool(false)
Output for 5.4.42
string(4) "test" string(32) "e1337d0cf51eb17cfcdcef29dc939441" bool(false) int(4) int(0) bool(false)
Output for 5.4.41
string(4) "test" string(32) "71120061c328ceaa5f54bebc49b514d3" bool(false) int(4) int(0) bool(false)
Output for 5.4.40
string(4) "test" string(32) "02d60af520775c1a766dc50a40e5e710" bool(false) int(4) int(0) bool(false)
Output for 5.4.39
string(4) "test" string(32) "3c616327b017866832e8c5fe5ca3631f" bool(false) int(4) int(0) bool(false)
Output for 5.4.38
string(4) "test" string(32) "131ca37560b51876d1f169beba2cdb1b" bool(false) int(4) int(0) bool(false)
Output for 5.4.37
string(4) "test" string(32) "e4aad6bc7dd7a026e1b8371c6e35cbe1" bool(false) int(4) int(0) bool(false)
Output for 5.4.36
string(4) "test" string(32) "d72f608ae7309232978513b94592b622" bool(false) int(4) int(0) bool(false)
Output for 5.4.35
string(4) "test" string(32) "5bb4c29c02ee5ad9c4bff86935fa46de" bool(false) int(4) int(0) bool(false)
Output for 5.4.34
string(4) "test" string(32) "4de7003374b55a4d4e8abaae23810119" bool(false) int(4) int(0) bool(false)
Output for 5.4.32
string(4) "test" string(32) "47a216cfb5622326c34c4148a8cccf34" bool(false) int(4) int(0) bool(false)
Output for 5.4.31
string(4) "test" string(32) "5be47fbfc7f3d06332796d7c4567da7c" bool(false) int(4) int(0) bool(false)
Output for 5.4.30
string(4) "test" string(32) "e4d0e4dc5b3b1150ab4500f1342fe4ab" bool(false) int(4) int(0) bool(false)
Output for 5.4.29
string(4) "test" string(32) "67b01ab023ed105fe9788d14e76da79b" bool(false) int(4) int(0) bool(false)
Output for 5.4.28
string(4) "test" string(32) "41528e67380ea93cf616f311e35e0966" bool(false) int(4) int(0) bool(false)
Output for 5.4.27
string(4) "test" string(32) "ed963b7e6b28f5baff052c1293a80718" bool(false) int(4) int(0) bool(false)
Output for 5.4.26
string(4) "test" string(32) "85bf345c3960329e1d6511f32f1e182a" bool(false) int(4) int(0) bool(false)
Output for 5.4.25
string(4) "test" string(32) "ec5457730448af97a41fb6e47e583f3c" bool(false) int(4) int(0) bool(false)
Output for 5.4.24
string(4) "test" string(32) "4934d03a012149be3292ea8cfdbe9542" bool(false) int(4) int(0) bool(false)
Output for 5.4.23
string(4) "test" string(32) "300c83c6a799944f99693538e51b0ebd" bool(false) int(4) int(0) bool(false)
Output for 5.4.22
string(4) "test" string(32) "c30bbf3675549446e8794b39f8f5906c" bool(false) int(4) int(0) bool(false)
Output for 5.4.21
string(4) "test" string(32) "cd34c9b12a045eb5eb6bf683f091d185" bool(false) int(4) int(0) bool(false)
Output for 5.4.20
string(4) "test" string(32) "cfa94a4a18bdc1e4f48b78bc63cee171" bool(false) int(4) int(0) bool(false)
Output for 5.4.19
string(4) "test" string(32) "fabec3407c1ac434afde34f21bda1d06" bool(false) int(4) int(0) bool(false)
Output for 5.4.18
string(4) "test" string(32) "716d1e13fb938478ff644dab1647c78d" bool(false) int(4) int(0) bool(false)
Output for 5.4.17
string(4) "test" string(32) "6af2ee3e23d7b66c6f91306a17f6ac67" bool(false) int(4) int(0) bool(false)
Output for 5.4.16
string(4) "test" string(32) "d449284f860a690ca0c7c7f5c73e70f4" bool(false) int(4) int(0) bool(false)
Output for 5.4.15
string(4) "test" string(32) "da886933d3dfc8a594181756a323cdb4" 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/jr68f 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/jr68f 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/jr68f 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/jr68f on line 3

preferences:
71.28 ms | 515 KiB | 5 Q