3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /*$string = '{"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 bI8gC
Output for 7.0.6 - 7.2.0
12 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/Wesqk:19 Stack trace: #0 /in/Wesqk(10): encryptIt('SmackFactory') #1 {main} thrown in /in/Wesqk 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
12.encrip: 8YR+fBDegOQk9Bb/g40+MYOiTVSY0eHhCJRXKtEhiBk= decript: SmackFactory<br/>44<br/>
Output for 5.3.22 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
12 Fatal error: Call to undefined function mcrypt_encrypt() in /in/Wesqk on line 19
Process exited with code 255.