3v4l.org

run code in 300+ PHP versions simultaneously
<?php $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv); $decryptedMessage = openssl_decrypt($encryptedMessage, $encryptionMethod, $secretHash, 0, $iv);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GD81u
function name:  (null)
number of ops:  30
compiled vars:  !0 = $iv_size, !1 = $iv, !2 = $encryptedMessage, !3 = $textToEncrypt, !4 = $encryptionMethod, !5 = $secretHash, !6 = $decryptedMessage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mcrypt_get_iv_size'
          1        FETCH_CONSTANT                                   ~7      'MCRYPT_RIJNDAEL_256'
          2        SEND_VAL_EX                                              ~7
          3        FETCH_CONSTANT                                   ~8      'MCRYPT_MODE_CBC'
          4        SEND_VAL_EX                                              ~8
          5        DO_FCALL                                      0  $9      
          6        ASSIGN                                                   !0, $9
    3     7        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          8        SEND_VAR_EX                                              !0
          9        FETCH_CONSTANT                                   ~11     'MCRYPT_RAND'
         10        SEND_VAL_EX                                              ~11
         11        DO_FCALL                                      0  $12     
         12        ASSIGN                                                   !1, $12
    4    13        INIT_FCALL_BY_NAME                                       'openssl_encrypt'
         14        SEND_VAR_EX                                              !3
         15        SEND_VAR_EX                                              !4
         16        SEND_VAR_EX                                              !5
         17        SEND_VAL_EX                                              0
         18        SEND_VAR_EX                                              !1
         19        DO_FCALL                                      0  $14     
         20        ASSIGN                                                   !2, $14
    5    21        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
         22        SEND_VAR_EX                                              !2
         23        SEND_VAR_EX                                              !4
         24        SEND_VAR_EX                                              !5
         25        SEND_VAL_EX                                              0
         26        SEND_VAR_EX                                              !1
         27        DO_FCALL                                      0  $16     
         28        ASSIGN                                                   !6, $16
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.57 ms | 1394 KiB | 13 Q