3v4l.org

run code in 300+ PHP versions simultaneously
<?php $key = hash_pbkdf2( 'sha256', 'foot assay palsy levin sn tenney slap rap sepoy sturm fine hue knox han pawn erro', "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\1e\x1f", 86000, 32, true ); $iv = random_bytes(openssl_cipher_iv_length('aes-256-gcm')); $data = 'Obscene artwork possibly from furaffinity.jpg'; $ciphertext = openssl_encrypt( $data, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv ); $decrypted = openssl_decrypt( $ciphertext, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv ); var_dump(bin2hex($ciphertext)); var_dump($decrypted);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JW5lp
function name:  (null)
number of ops:  45
compiled vars:  !0 = $key, !1 = $iv, !2 = $data, !3 = $ciphertext, !4 = $decrypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'hash_pbkdf2'
    3     1        SEND_VAL                                                 'sha256'
    4     2        SEND_VAL                                                 'foot+assay+palsy+levin+sn+tenney+slap+rap+sepoy+sturm+fine+hue+knox+han+pawn+erro'
    5     3        SEND_VAL                                                 '%00%01%02%03%04%05%06%07%08%09%0A%0B%0C%0D%00e%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%01e%1F'
    6     4        SEND_VAL                                                 86000
    7     5        SEND_VAL                                                 32
    8     6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $5      
    2     8        ASSIGN                                                   !0, $5
   11     9        INIT_FCALL                                               'random_bytes'
         10        INIT_FCALL_BY_NAME                                       'openssl_cipher_iv_length'
         11        SEND_VAL_EX                                              'aes-256-gcm'
         12        DO_FCALL                                      0  $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !1, $8
   13    16        ASSIGN                                                   !2, 'Obscene+artwork+possibly+from+furaffinity.jpg'
   15    17        INIT_FCALL_BY_NAME                                       'openssl_encrypt'
   16    18        SEND_VAR_EX                                              !2
   17    19        SEND_VAL_EX                                              'aes-256-gcm'
   16    20        SEND_VAR_EX                                              !0
   19    21        FETCH_CONSTANT                                   ~11     'OPENSSL_RAW_DATA'
         22        SEND_VAL_EX                                              ~11
   16    23        SEND_VAR_EX                                              !1
         24        DO_FCALL                                      0  $12     
   15    25        ASSIGN                                                   !3, $12
   23    26        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
   24    27        SEND_VAR_EX                                              !3
   25    28        SEND_VAL_EX                                              'aes-256-gcm'
   24    29        SEND_VAR_EX                                              !0
   27    30        FETCH_CONSTANT                                   ~14     'OPENSSL_RAW_DATA'
         31        SEND_VAL_EX                                              ~14
   24    32        SEND_VAR_EX                                              !1
         33        DO_FCALL                                      0  $15     
   23    34        ASSIGN                                                   !4, $15
   31    35        INIT_FCALL                                               'var_dump'
         36        INIT_FCALL                                               'bin2hex'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                         $17     
         39        SEND_VAR                                                 $17
         40        DO_ICALL                                                 
   33    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !4
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.79 ms | 1392 KiB | 21 Q