3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 1; $block = mcrypt_get_block_size('des', 'ecb'); $pad = $block - (strlen($str) % $block); $str .= str_repeat(chr($pad), $pad); echo rawurlencode(mcrypt_encrypt(MCRYPT_DES, 'd9daa', $str, MCRYPT_MODE_ECB));
based on unWpa
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/07ZXd
function name:  (null)
number of ops:  31
compiled vars:  !0 = $str, !1 = $block, !2 = $pad
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, 1
   5     1        INIT_FCALL                                               'mcrypt_get_block_size'
         2        SEND_VAL                                                 'des'
         3        SEND_VAL                                                 'ecb'
         4        DO_ICALL                                         $4      
         5        ASSIGN                                                   !1, $4
   6     6        STRLEN                                           ~6      !0
         7        MOD                                              ~7      ~6, !1
         8        SUB                                              ~8      !1, ~7
         9        ASSIGN                                                   !2, ~8
   7    10        INIT_FCALL                                               'str_repeat'
        11        INIT_FCALL                                               'chr'
        12        SEND_VAR                                                 !2
        13        DO_ICALL                                         $10     
        14        SEND_VAR                                                 $10
        15        SEND_VAR                                                 !2
        16        DO_ICALL                                         $11     
        17        ASSIGN_CONCAT                                 0          !0, $11
   9    18        INIT_FCALL                                               'rawurlencode'
        19        INIT_FCALL                                               'mcrypt_encrypt'
        20        FETCH_CONSTANT                                   ~13     'MCRYPT_DES'
        21        SEND_VAL                                                 ~13
        22        SEND_VAL                                                 'd9daa'
        23        SEND_VAR                                                 !0
        24        FETCH_CONSTANT                                   ~14     'MCRYPT_MODE_ECB'
        25        SEND_VAL                                                 ~14
        26        DO_ICALL                                         $15     
        27        SEND_VAR                                                 $15
        28        DO_ICALL                                         $16     
        29        ECHO                                                     $16
        30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0