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
Output for 7.0.6 - 7.2.0
731 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/1PfHb:19 Stack trace: #0 /in/1PfHb(10): encryptIt('{"head":[{"Form...') #1 {main} thrown in /in/1PfHb on line 19
Process exited with code 255.
Output for 5.4.12 - 5.5.34, 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
731.encrip: 66gayiJQk7cgweBMNrqP1eYPGAYAaKzFx1n/2KSGmYOxLlzMk85GpalCtsr7fc0iyBzKlzYBfSBscillOE83Rb0lFtexHlV1TvNFe0A/6bpGS0EiOpOEDXK29kpNrJzwCOUIW5fguVYzF9DDZ/dHAeSM74SjzOs4y9SKUlzp3uzWOeZOl/H7GEmFzcxqRI6tZCsVwzh7u+MWXEJurhRK2fWUKvI9hDmY1zC1in7Hs8b2gERXJw0wZf3eHx6E9cTvlE5pvMDpNFFlH73mTfbjn7j9LbFS9j30LqwiHW8uuNBbIPhADr2Wj6+xzuKs3bbTI3ndMTg7HoEIaEsTViJAIA3AqdlI+YZLE3V5hbQNxP3X9QJQxFjMq8GA0wO4UTzOnuuJjgV4DXFhaIoxKe1AQIOL7CW5/nr0HAKQoebXCVGA8ra5DA0U4WU3wrSDnJ7IJNcDIcnBvIzQPa5LK1oHWzhQZYvQNeLGNPsGFX8aQM7cFCx3+BLb9x98bmn4s1dXAx2pBvIgcc6WZNnHoWg6ZvlD7/4rfWqZI7k7QKGztjw0gjU7BILicBepZlopm8CqYZlSVToU40iemIseIup5qHNR4d68bkN6ypGtRNIsoymvMOE5G6uYhWhEaYV0jhL3Fi+ar4dbvudefXK7CThe5FBQw8NN7z1pfbf1dFSujmH82LF+//9G2smpMt5leNnMXdXyNPPnVR2p9EZgyBQfewVUMa3yjks3gRdWqpDqzACKLadeT38BjswZHcF3J38yky/Ai/WASmdNEvLUfkj6bOKYoP4QR37/eWlcZvqGDAKYZELIxOSzZprh9I2gpg1UId2RtUDbYwQnOHVsg0PzBcENVZjWuAlzKQNvlnPwjm0Pspm7V0DHaVOeJ2bJJ2VnIO4XWGNItxZC3xD+SnLUNAH99yrEn+1NNy163jqMCoZuitmdLx78HrnTNZrRwYabhNlehbp0S6ed0Vuu6ZNipw== decript: {"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"}]}<br/>984<br/>
Output for 5.3.22 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
731 Fatal error: Call to undefined function mcrypt_encrypt() in /in/1PfHb on line 19
Process exited with code 255.