3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $key = '057e6752d585a7a94894dff65ab2537e'; $key = hash('sha256', $key, true); function encrypt($value) { $encryption_key = base64_decode($key); $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc')); $encrypted = openssl_encrypt($value, 'aes-256-cbc', $encryption_key, 0, $iv); return base64_encode($encrypted . '::' . $iv); } function decrypt($value) { $encryption_key = base64_decode($key); list($encrypted_data, $iv) = explode('::', base64_decode($value), 2); return openssl_decrypt($encrypted_data, 'aes-256-cbc', $encryption_key, 0, $iv); } $criptando = encrypt('1038'); echo 'criptando : ' . $criptando . '<br>'; echo 'decriptando: ' . decrypt($criptando);
based on RT41k
Output for 7.0.0 - 7.3.1
Notice: Undefined variable: key in /in/l3asq on line 6 Fatal error: Uncaught Error: Call to undefined function openssl_random_pseudo_bytes() in /in/l3asq:7 Stack trace: #0 /in/l3asq(18): encrypt('1038') #1 {main} thrown in /in/l3asq on line 7
Process exited with code 255.
Output for hhvm-3.22.0
Notice: Undefined variable: key in /in/l3asq on line -1 criptando : WTNMYTRVMDBwWFpBRHNrN09aMWRqZz09OjqGpvLB06jSoSsEma/UaMvA<br> Notice: Undefined variable: key in /in/l3asq on line -1 decriptando: 1038
Output for hhvm-3.21.3
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : TkxERWY1bU9TYUlLQ0JkOTEybkYzUT09Ojrl1+NRDWGQuHxmNzXeLv1d<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for hhvm-3.18.5
Notice: Undefined variable: key in /in/l3asq on line 6 Warning: base64_decode() expects parameter 1 to be string, null given in /in/l3asq on line 6 Warning: openssl_encrypt() expects parameter 3 to be string, null given in /in/l3asq on line 8 criptando : OjqY61qdxQ7QGDpn9NL6qiSW<br> Notice: Undefined variable: key in /in/l3asq on line 13 Warning: base64_decode() expects parameter 1 to be string, null given in /in/l3asq on line 13 Warning: openssl_decrypt() expects parameter 3 to be string, null given in /in/l3asq on line 15 decriptando:
Output for 5.6.38
Notice: Undefined variable: key in /in/l3asq on line 6 Fatal error: Call to undefined function openssl_random_pseudo_bytes() in /in/l3asq on line 7
Process exited with code 255.
Output for 5.6.30
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : eU1LL0Y5elRGWFkrbG55bjNVN3dadz09OjqmHi5YbGlbIo0IiXg3iQnV<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.29
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : WWxRck5ZQlhCcXp2NVYxZmxIU3RTUT09OjoNltybCH7SXAbxXEWP4PsS<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.28
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : VmNIRHM5RURkZkd3c0NrYm5HREJYQT09Ojo2CQAMLbkbVp+gFNS7HCoT<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.27
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : K25tSnFMcXRFSFdGNmF5Ym9qZzlHQT09OjoVyVSYzQs0QzGs1HOComQd<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.26
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : NXhPS2RFa2FMeGU5Q1VRVDRkRktGUT09OjrG7jUONv5CcggJrgRnavUP<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.25
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : ZkRibzBmT3JsVkZJQ0hmcVJBR2hZUT09Ojq3JX/T0DYOukXeT8BAITze<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.24
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : cUY0emd6aGNTTXRxMmQzcitiNWUwZz09OjpCo8lSbNQZHUyQaXP3bPSI<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.23
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : OXB1aERDcitwT1BJZnR4SUhRT1NWdz09Ojp+GgkWLRTegd6jBAMXA0Tu<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.22
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : UVJscndNajNsQm84b2ViSlBRYmJ3UT09OjoADRlQKOJW3lFN39LBa1UA<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.21
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : OWo1c29yd1JzNU1MU1FnVFVtYm4yZz09Ojov7mlN9vjpvyVxnX0eFELq<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.20
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : dkVaNUMyNGxsTk91WjJKU1pqcm5FQT09OjoHoekS62YJVSThI3ym+QzS<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.19
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : OTdhcVNVK2E4TEtnZTdUQ3I0OVlDdz09OjrvJ+zC2l+2x3TuAx/ZG/kd<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.18
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : RnF0MDVwc1R3OWtDeDlockpjQUxoQT09Ojq7HS3iG2MlBh1WkXIGyjKy<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.17
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : WkpPbTlSMWlBU2kvbCtqR3Z2Zk5Ddz09OjrRwSGRpfvG3WmkuaEJQGIm<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.16
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : MFROenlPb0dhcEV1NE5DZVFGU1IvZz09Ojr3RIQYPA8o1OF45HRQg1V0<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.15
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : ZFA5NklIQWdnbXB6RnB5NityazFpUT09OjqyIMHzbe38HDhg4KNMwkgO<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.14
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : d0twOVdoN2ZkRGYvaUlLTDJ3dk12dz09OjqVxJSu5bIavBRBwAS09mS6<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.13
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : ekl0a3FmUXB3V3FNazMxMVYzb2VXUT09OjrZM6U2igfmpXA2ZwED1QFg<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.12
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : WHcva3VTemdBWGRxWFhiTFc3Nnc2UT09OjpiW+khPP2xL8S2lm9BR7tC<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.11
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : TzVzQnJPRitkMXY1UDB5c0NJV1VHQT09OjpszEajEkhYD+hfeS0OMj4h<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.10
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : MHZsNUxURnBaaGJJblVIdytjQkI0dz09OjoCnn4tvIhDiKrR5qtdeJNv<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.9
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : Z0VkcndhMU9jQmRlY0VtL1BzUVlsdz09OjpMt7gDGQmPcDxDEF+Z3fc/<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.8
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : dnI3c215V0k0d3c3UkRVMUN6UzFsZz09Ojq9vOospJojoeXgcyLQS/nt<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.7
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : ekVHTWVwdGlGS3k2ZlNHUEhoVVZwUT09Ojrtaf+PMFXdXyj0yM1jJ+b1<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.6
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : QjJSUHdVVDF6YU1OMU5BZFMyWmZLZz09OjrJjVm5bMdY5KPfnqyCNCnR<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.5
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : SlNBNWpodGQ1TTRyclJEVnRVVVN1UT09OjrUjFPOgbVVUCPRUqYnimGV<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.4
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : b1B2Z29aTHFTcC8wdzJEeURZMW5zZz09Ojqe/NMcbHIX+pWajutRkzKJ<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.3
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : TnR1bHdnOFYvNlpyS1ZPU0ltY3BZQT09Ojr7p3wkxarb68E9DyTLrfZ+<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.2
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : TkQrSXZoSVpNTWZSNGRJcXFIUjkxZz09OjqVYy5ZFfF28xrcXvxxmtap<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.1
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : VGxvSG85Ui9USzlqOXN0ODhnK3Fsdz09OjqQE0sIzGsNWfi4YnRjJap7<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038
Output for 5.6.0
Notice: Undefined variable: key in /in/l3asq on line 6 criptando : ZHRTdUdSWnZqRVV2QU4xSGdiMmlzUT09Ojr7PrpWz8ts9+3Ome1GRogs<br> Notice: Undefined variable: key in /in/l3asq on line 13 decriptando: 1038