3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inputString = "vlastimil.havranek-18052017-drest4drx35gxdrg54"; $method = "AES-256-CBC"; $decrptKey = "175f814klcb8b777a024eb68e07a91ed"; $iv = "d44678c59b972f37"; echo "\r\nOPENSSL_RAW_DATA value: ".OPENSSL_RAW_DATA; echo "\r\nOPENSSL_ZERO_PADDING value: ".OPENSSL_ZERO_PADDING; //echo "\r\ncombined value: ".OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING; $opt = OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING; $enS = openssl_encrypt ($inputString, $method, $decrptKey,$opt,$iv); echo "\r\nencrypted string: ".$enS; //result for opts flag 0 is udAXfqVMVCsvmtcGJLnrOb5DbMfr+dcYjdzvepdep0ZGJehqG/X1UE/mt7L5835K //$enS = //hex2bin("1f032967f6142d528d1c5d88b129bd502b6d96cd7775278f38861378f771bad95246eeab3dac2cba72453654b03cc04f"); //"udAXfqVMVCsvmtcGJLnrOb5DbMfr+dcYjdzvepdep0ZGJehqG/X1UE/mt7L5835K"; //"1f032967f6142d528d1c5d88b129bd502b6d96cd7775278f38861378f771bad95246eeab3dac2cba72453654b03cc04f"; $decrptKeyData=openssl_decrypt($enS,$method,$decrptKey,$opt,$iv); echo "\r\ndecrypted string: ".$decrptKeyData;
Output for 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: Undefined constant "OPENSSL_RAW_DATA" in /in/PYPg5N:7 Stack trace: #0 {main} thrown in /in/PYPg5N on line 7
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.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' (this will throw an Error in a future version of PHP) in /in/PYPg5N on line 7 OPENSSL_RAW_DATA value: OPENSSL_RAW_DATA Warning: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' (this will throw an Error in a future version of PHP) in /in/PYPg5N on line 8 OPENSSL_ZERO_PADDING value: OPENSSL_ZERO_PADDING Warning: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' (this will throw an Error in a future version of PHP) in /in/PYPg5N on line 10 Warning: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' (this will throw an Error in a future version of PHP) in /in/PYPg5N on line 10 Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/PYPg5N:11 Stack trace: #0 {main} thrown in /in/PYPg5N on line 11
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25
Notice: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' in /in/PYPg5N on line 7 OPENSSL_RAW_DATA value: OPENSSL_RAW_DATA Notice: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' in /in/PYPg5N on line 8 OPENSSL_ZERO_PADDING value: OPENSSL_ZERO_PADDING Notice: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' in /in/PYPg5N on line 10 Notice: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' in /in/PYPg5N on line 10 Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/PYPg5N:11 Stack trace: #0 {main} thrown in /in/PYPg5N on line 11
Process exited with code 255.
Output for 5.6.38
Notice: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' in /in/PYPg5N on line 7 OPENSSL_RAW_DATA value: OPENSSL_RAW_DATA Notice: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' in /in/PYPg5N on line 8 OPENSSL_ZERO_PADDING value: OPENSSL_ZERO_PADDING Notice: Use of undefined constant OPENSSL_RAW_DATA - assumed 'OPENSSL_RAW_DATA' in /in/PYPg5N on line 10 Notice: Use of undefined constant OPENSSL_ZERO_PADDING - assumed 'OPENSSL_ZERO_PADDING' in /in/PYPg5N on line 10 Fatal error: Call to undefined function openssl_encrypt() in /in/PYPg5N on line 11
Process exited with code 255.

preferences:
182.14 ms | 413 KiB | 5 Q