3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $input = '{"head":[{"FormId": "FR100400061","CatchDate": "2016-01-25T12:17:57","TravelerId": "80222557","TravelerName": "El gio gonzales","Status": 1,"CustAccount": "1004","CustName":"Court de Tennis","Middleman":"1008","MiddlemanName":"Wide World Importers","DataAreaId":"frrt","CreatedBy": "123","CreatedDateTime": "2016-01-25T12:17:57"}],"lines": [{"ItemId": "IVA21","FamilyId": "","FamilyDescription": "Zapatitos","TotalVal": 123.0,"TaxVal": 21.35,"BaseVal": 101.65,"FormId":"FR100400061","RefundVal": 13.0,"DataAreaId": "frrt"}],"traveler":[{"TravelerId":"80222557","Email":"garanda21@gmail.com","Name":"El gio gonzales","Country": "PE","CountryName": "Peru","Address":"Calle de abaja bien abajo","Gender": 1,"Birthdate":"23/12/1982"}]}'; //$input = "SmackFactory"; echo strlen($input);//1756800 bytes $encrypted = encryptIt( $input ); $decrypted = decryptIt( $encrypted ); echo ".encrip: " . $encrypted . ' decript: ' . $decrypted; echo '<br/>'.strlen($encrypted).'<br/>';//99 bytes function encryptIt( $q ) { $cryptKey = 'qJB0rGtIn5UB1xG03efyCp'; $qEncoded = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) ); return( $qEncoded ); } function decryptIt( $q ) { $cryptKey = 'qJB0rGtIn5UB1xG03efyCp'; $qDecoded = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0"); return( $qDecoded ); } //$compressed = lzw_compress($string); //$compressed = gzdeflate($compressed, 9); /*echo $string*/ //echo gzinflate(gzinflate($compressed)); ?>
based on u4Msp
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/1PfHb
function name:  (null)
number of ops:  22
compiled vars:  !0 = $input, !1 = $encrypted, !2 = $decrypted
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   4     0  E >   ASSIGN                                                   !0, '%7B%22head%22%3A%5B%7B%22FormId%22%3A+%22FR100400061%22%2C%22CatchDate%22%3A+%222016-01-25T12%3A17%3A57%22%2C%22TravelerId%22%3A+%2280222557%22%2C%22TravelerName%22%3A+%22El+gio+gonzales%22%2C%22Status%22%3A+1%2C%22CustAccount%22%3A+%221004%22%2C%22CustName%22%3A%22Court+de+Tennis%22%2C%22Middleman%22%3A%221008%22%2C%22MiddlemanName%22%3A%22Wide+World+Importers%22%2C%22DataAreaId%22%3A%22frrt%22%2C%22CreatedBy%22%3A+%22123%22%2C%22CreatedDateTime%22%3A+%222016-01-25T12%3A17%3A57%22%7D%5D%2C%22lines%22%3A+%5B%7B%22ItemId%22%3A+%22IVA21%22%2C%22FamilyId%22%3A+%22%22%2C%22FamilyDescription%22%3A+%22Zapatitos%22%2C%22TotalVal%22%3A+123.0%2C%22TaxVal%22%3A+21.35%2C%22BaseVal%22%3A+101.65%2C%22FormId%22%3A%22FR100400061%22%2C%22RefundVal%22%3A+13.0%2C%22DataAreaId%22%3A+%22frrt%22%7D%5D%2C%22traveler%22%3A%5B%7B%22TravelerId%22%3A%2280222557%22%2C%22Email%22%3A%22garanda21%40gmail.com%22%2C%22Name%22%3A%22El+gio+gonzales%22%2C%22Country%22%3A+%22PE%22%2C%22CountryName%22%3A+%22Peru%22%2C%22Address%22%3A%22Calle+de+abaja+bien+abajo%22%2C%22Gender%22%3A+1%2C%22Birthdate%22%3A%2223%2F12%2F1982%22%7D%5D%7D'
   8     1        STRLEN                                           ~4      !0
         2        ECHO                                                     ~4
  10     3        INIT_FCALL_BY_NAME                                       'encryptIt'
         4        SEND_VAR_EX                                              !0
         5        DO_FCALL                                      0  $5      
         6        ASSIGN                                                   !1, $5
  11     7        INIT_FCALL_BY_NAME                                       'decryptIt'
         8        SEND_VAR_EX                                              !1
         9        DO_FCALL                                      0  $7      
        10        ASSIGN                                                   !2, $7
  13    11        CONCAT                                           ~9      '.encrip%3A+', !1
        12        CONCAT                                           ~10     ~9, '+decript%3A+'
        13        CONCAT                                           ~11     ~10, !2
        14        ECHO                                                     ~11
  15    15        STRLEN                                           ~12     !1
        16        CONCAT                                           ~13     '%3Cbr%2F%3E', ~12
        17        CONCAT                                           ~14     ~13, '%3Cbr%2F%3E'
        18        ECHO                                                     ~14
  17    19        NOP                                                      
  23    20        NOP                                                      
  27    21      > RETURN                                                   1

Function encryptit:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/1PfHb
function name:  encryptIt
number of ops:  26
compiled vars:  !0 = $q, !1 = $cryptKey, !2 = $qEncoded
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  17     0  E >   RECV                                             !0      
  18     1        ASSIGN                                                   !1, 'qJB0rGtIn5UB1xG03efyCp'
  19     2        INIT_FCALL                                               'base64_encode'
         3        INIT_FCALL                                               'mcrypt_encrypt'
         4        FETCH_CONSTANT                                   ~4      'MCRYPT_RIJNDAEL_256'
         5        SEND_VAL                                                 ~4
         6        INIT_FCALL                                               'md5'
         7        SEND_VAR                                                 !1
         8        DO_ICALL                                         $5      
         9        SEND_VAR                                                 $5
        10        SEND_VAR                                                 !0
        11        FETCH_CONSTANT                                   ~6      'MCRYPT_MODE_CBC'
        12        SEND_VAL                                                 ~6
        13        INIT_FCALL                                               'md5'
        14        INIT_FCALL                                               'md5'
        15        SEND_VAR                                                 !1
        16        DO_ICALL                                         $7      
        17        SEND_VAR                                                 $7
        18        DO_ICALL                                         $8      
        19        SEND_VAR                                                 $8
        20        DO_ICALL                                         $9      
        21        SEND_VAR                                                 $9
        22        DO_ICALL                                         $10     
        23        ASSIGN                                                   !2, $10
  20    24      > RETURN                                                   !2
  21    25*     > RETURN                                                   null

End of function encryptit

Function decryptit:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/1PfHb
function name:  decryptIt
number of ops:  30
compiled vars:  !0 = $q, !1 = $cryptKey, !2 = $qDecoded
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  23     0  E >   RECV                                             !0      
  24     1        ASSIGN                                                   !1, 'qJB0rGtIn5UB1xG03efyCp'
  25     2        INIT_FCALL                                               'rtrim'
         3        INIT_FCALL                                               'mcrypt_decrypt'
         4        FETCH_CONSTANT                                   ~4      'MCRYPT_RIJNDAEL_256'
         5        SEND_VAL                                                 ~4
         6        INIT_FCALL                                               'md5'
         7        SEND_VAR                                                 !1
         8        DO_ICALL                                         $5      
         9        SEND_VAR                                                 $5
        10        INIT_FCALL                                               'base64_decode'
        11        SEND_VAR                                                 !0
        12        DO_ICALL                                         $6      
        13        SEND_VAR                                                 $6
        14        FETCH_CONSTANT                                   ~7      'MCRYPT_MODE_CBC'
        15        SEND_VAL                                                 ~7
        16        INIT_FCALL                                               'md5'
        17        INIT_FCALL                                               'md5'
        18        SEND_VAR                                                 !1
        19        DO_ICALL                                         $8      
        20        SEND_VAR                                                 $8
        21        DO_ICALL                                         $9      
        22        SEND_VAR                                                 $9
        23        DO_ICALL                                         $10     
        24        SEND_VAR                                                 $10
        25        SEND_VAL                                                 '%00'
        26        DO_ICALL                                         $11     
        27        ASSIGN                                                   !2, $11
  26    28      > RETURN                                                   !2
  27    29*     > RETURN                                                   null

End of function decryptit

Generated using Vulcan Logic Dumper, using php 7.1.0