3v4l.org

run code in 300+ PHP versions simultaneously
<?php //echo openssl_cipher_iv_length('aes-256-gcm'); $secret="This is a secret message."; $key="d8b163deda806acaede2f807"; echo $iv=openssl_random_pseudo_bytes(12); $iv = "0e42519c0eda67c22c52b605ff41fde395880ebf6ed40a560b5f5ecc8183d26a"; $method="aes-256-gcm"; $encrypted = "95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7"; //$encrypted=openssl_encrypt($secret,$method,$key,false,$iv); $decrypted=openssl_decrypt($encrypted,$method,$key,false,$iv); echo $encrypted; echo "<br>"; echo $decrypted;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mYosf
function name:  (null)
number of ops:  22
compiled vars:  !0 = $secret, !1 = $key, !2 = $iv, !3 = $method, !4 = $encrypted, !5 = $decrypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'This+is+a+secret+message.'
    7     1        ASSIGN                                                   !1, 'd8b163deda806acaede2f807'
    8     2        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          3        SEND_VAL_EX                                              12
          4        DO_FCALL                                      0  $8      
          5        ASSIGN                                           ~9      !2, $8
          6        ECHO                                                     ~9
    9     7        ASSIGN                                                   !2, '0e42519c0eda67c22c52b605ff41fde395880ebf6ed40a560b5f5ecc8183d26a'
   10     8        ASSIGN                                                   !3, 'aes-256-gcm'
   11     9        ASSIGN                                                   !4, '95b52983e7dfb2bac4cc11ed84644656dc6266674d58edb1750dfb8e2adf13c7'
   15    10        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
         11        SEND_VAR_EX                                              !4
         12        SEND_VAR_EX                                              !3
         13        SEND_VAR_EX                                              !1
         14        SEND_VAL_EX                                              <false>
         15        SEND_VAR_EX                                              !2
         16        DO_FCALL                                      0  $13     
         17        ASSIGN                                                   !5, $13
   17    18        ECHO                                                     !4
   18    19        ECHO                                                     '%3Cbr%3E'
   19    20        ECHO                                                     !5
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.9 ms | 1393 KiB | 13 Q