3v4l.org

run code in 300+ PHP versions simultaneously
<?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)); ?>
Output for 7.0.6 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
12 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/u4Msp:19 Stack trace: #0 /in/u4Msp(10): encryptIt('SmackFactory') #1 {main} thrown in /in/u4Msp on line 19
Process exited with code 255.
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 12 Fatal error: Uncaught Error: Call to undefined function mcrypt_encrypt() in /in/u4Msp:19 Stack trace: #0 /in/u4Msp(10): encryptIt('SmackFactory') #1 {main} thrown in /in/u4Msp on line 19
Process exited with code 255.
Output for 5.5.24 - 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.5.35, 5.6.21 - 5.6.28
12 Fatal error: Call to undefined function mcrypt_encrypt() in /in/u4Msp on line 19
Process exited with code 255.

preferences:
170.26 ms | 401 KiB | 183 Q