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 $encrypted . '<br />' . $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 ); } echo strlen($input);//1756800 bytes //$compressed = lzw_compress($string); //$compressed = gzdeflate($compressed, 9); echo '<br/>'.strlen($compressed).'<br/>';//99 bytes /*echo $string*/ //echo gzinflate(gzinflate($compressed)); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0090.01218.40
8.3.50.0160.00318.17
8.3.40.0100.00518.84
8.3.30.0110.01118.71
8.3.20.0000.00720.34
8.3.10.0040.00420.61
8.3.00.0070.00021.76
8.2.180.0110.00716.59
8.2.170.0070.01022.96
8.2.160.0100.01022.07
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0040.00721.11
8.2.120.0050.00226.35
8.2.110.0060.00319.19
8.2.100.0000.01218.03
8.2.90.0040.00419.28
8.2.80.0090.00017.97
8.2.70.0050.00317.75
8.2.60.0040.00417.89
8.2.50.0040.00418.09
8.2.40.0070.00420.35
8.2.30.0000.00819.38
8.2.20.0080.00017.85
8.2.10.0040.00418.20
8.2.00.0000.00817.99
8.1.280.0160.00625.92
8.1.270.0040.00422.14
8.1.260.0030.00528.09
8.1.250.0070.00028.09
8.1.240.0090.00320.66
8.1.230.0090.00617.76
8.1.220.0040.00417.79
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0080.00017.35
8.1.180.0030.00618.10
8.1.170.0040.00418.57
8.1.160.0000.00920.60
8.1.150.0040.00418.77
8.1.140.0000.00717.35
8.1.130.0070.00017.60
8.1.120.0070.00017.32
8.1.110.0000.00717.41
8.1.100.0040.00317.39
8.1.90.0020.00517.42
8.1.80.0030.00517.44
8.1.70.0040.00417.32
8.1.60.0080.00317.62
8.1.50.0030.00617.47
8.1.40.0080.00017.61
8.1.30.0030.00517.57
8.1.20.0060.00317.52
8.1.10.0040.00417.58
8.1.00.0050.00317.42
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0000.00718.53
8.0.270.0030.00516.96
8.0.260.0070.00017.28
8.0.250.0030.00317.01
8.0.240.0000.00717.04
8.0.230.0040.00416.88
8.0.220.0070.00316.82
8.0.210.0030.00516.79
8.0.200.0030.00316.87
8.0.190.0040.00416.88
8.0.180.0000.00716.82
8.0.170.0080.00016.88
8.0.160.0030.00517.00
8.0.150.0040.00416.85
8.0.140.0070.00016.90
8.0.130.0000.00713.23
8.0.120.0040.00416.93
8.0.110.0000.00816.88
8.0.100.0000.00816.86
8.0.90.0080.00016.96
8.0.80.0090.00616.87
8.0.70.0040.00416.79
8.0.60.0000.00816.87
8.0.50.0040.00416.89
8.0.30.0090.01117.16
8.0.20.0110.01217.40
8.0.10.0070.00016.89
8.0.00.0090.00916.75
7.4.330.0000.00516.74
7.4.320.0040.00416.56
7.4.300.0000.00716.52
7.4.290.0000.00716.63
7.4.280.0040.00416.61
7.4.270.0040.00416.54
7.4.260.0050.00316.45
7.4.250.0040.00416.60
7.4.240.0000.00716.51
7.4.230.0030.00316.64
7.4.220.0080.00916.63
7.4.210.0060.00916.62
7.4.200.0000.00716.53
7.4.160.0060.00916.60
7.4.150.0070.01717.40
7.4.140.0110.00817.86
7.4.130.0170.00416.58
7.4.120.0080.01316.49
7.4.110.0030.01316.61
7.4.100.0090.01216.64
7.4.90.0130.00716.54
7.4.80.0160.01019.39
7.4.70.0080.01116.62
7.4.60.0110.00716.61
7.4.50.0110.00416.67
7.4.40.0120.00716.59
7.4.30.0100.00616.42
7.4.00.0060.01215.23
7.3.330.0000.00613.32
7.3.320.0000.00513.22
7.3.310.0000.00716.31
7.3.300.0040.00416.34
7.3.290.0030.00316.22
7.3.280.0100.00816.34
7.3.270.0080.01417.40
7.3.260.0080.01216.36
7.3.250.0080.00916.40
7.3.240.0090.00816.46
7.3.230.0090.01516.39
7.3.210.0100.00716.46
7.3.200.0070.01016.32
7.3.190.0080.01116.45
7.3.180.0130.00316.50
7.3.170.0000.02116.71
7.3.160.0090.01216.17
7.3.10.0080.00816.30
7.3.00.0160.00316.52
7.2.330.0130.00516.64
7.2.320.0070.01016.38
7.2.310.0030.01416.52
7.2.300.0110.00616.52
7.2.290.0060.01016.73
7.2.130.0060.00816.39
7.2.120.0140.00315.96
7.2.110.0060.00316.49
7.2.100.0070.00716.50
7.2.90.0130.00516.79
7.2.80.0060.00616.51
7.2.70.0030.01216.37
7.2.60.0080.00716.57
7.2.50.0090.00916.61
7.2.40.0040.00916.63
7.2.30.0060.00616.35
7.2.20.0100.00316.35
7.2.10.0060.01316.57
7.2.00.0120.00117.87
7.1.250.0040.01115.38
7.1.200.0030.01115.64
7.1.100.0090.00318.00
7.1.70.0000.00817.10
7.1.60.0090.01619.27
7.1.50.0130.01016.89
7.1.00.0070.07022.45
7.0.200.0450.00014.75
7.0.60.0300.07319.91
7.0.50.0030.08318.01
7.0.40.0130.05320.36
7.0.30.0170.04720.29
7.0.20.0430.06720.16
7.0.10.0130.07720.15
7.0.00.0030.04320.33
5.6.280.0070.05721.10
5.6.210.0100.07020.73
5.6.200.0030.07318.32
5.6.190.0070.08020.65
5.6.180.0230.05320.66
5.6.170.0230.08020.53
5.6.160.0070.04020.53
5.6.150.0070.08018.27
5.6.140.0130.07318.22
5.6.130.0070.06718.20
5.6.120.0100.07021.09
5.6.110.0100.06721.22
5.6.100.0170.06021.05
5.6.90.0100.07720.97
5.6.80.0070.08320.59
5.5.350.0330.06720.39
5.5.340.0130.06317.97
5.5.330.0070.04720.27
5.5.320.0600.04720.30
5.5.310.0270.07720.42
5.5.300.0070.04018.00
5.5.290.0070.07718.00
5.5.280.0070.05020.96
5.5.270.0100.08320.97
5.5.260.0030.07320.94
5.5.250.0030.04320.79
5.5.240.0070.05020.30

preferences:
96.82 ms | 401 KiB | 5 Q