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"}]}'; /* $str = "sample data"; $bzstr = bzcompress($string, 9); echo $bzstr;*/ //$string = str_repeat('1234567890'.implode('',range('a','z')),48800); $sJSON = json_encode($string); echo $sJSON; echo strlen($sJSON);//1756800 bytes $compressed = gzdeflate($string, 9); //$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.0110.01118.55
8.3.50.0070.01221.97
8.3.40.0090.01218.82
8.3.30.0150.00018.77
8.3.20.0040.00420.46
8.3.10.0040.00420.48
8.3.00.0080.00022.04
8.2.180.0040.01116.63
8.2.170.0140.00722.96
8.2.160.0070.00721.96
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0050.00221.07
8.2.120.0080.00026.35
8.2.110.0030.00619.39
8.2.100.0080.00418.18
8.2.90.0000.00819.38
8.2.80.0060.00317.97
8.2.70.0080.00017.75
8.2.60.0000.00817.93
8.2.50.0030.00618.09
8.2.40.0040.00720.67
8.2.30.0070.00019.60
8.2.20.0030.00517.81
8.2.10.0040.00418.32
8.2.00.0070.00018.41
8.1.280.0180.00025.92
8.1.270.0120.00622.30
8.1.260.0070.00028.09
8.1.250.0080.00028.09
8.1.240.0060.00322.47
8.1.230.0040.00817.77
8.1.220.0000.00817.91
8.1.210.0080.00018.77
8.1.200.0030.00917.48
8.1.190.0080.00017.48
8.1.180.0050.00318.10
8.1.170.0030.00718.82
8.1.160.0000.00820.95
8.1.150.0030.00619.02
8.1.140.0040.00419.75
8.1.130.0030.00317.91
8.1.120.0000.00717.53
8.1.110.0050.00317.54
8.1.100.0040.00417.55
8.1.90.0040.00417.60
8.1.80.0080.00017.65
8.1.70.0070.00017.69
8.1.60.0040.00417.77
8.1.50.0000.00817.59
8.1.40.0040.00417.64
8.1.30.0040.00417.84
8.1.20.0000.00717.73
8.1.10.0000.00717.79
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0040.00416.88
8.0.280.0000.00718.67
8.0.270.0000.00818.63
8.0.260.0000.00717.45
8.0.250.0000.00717.16
8.0.240.0030.00317.11
8.0.230.0040.00316.97
8.0.220.0030.00317.10
8.0.210.0070.00016.95
8.0.200.0030.00317.14
8.0.190.0000.00817.03
8.0.180.0030.00316.94
8.0.170.0040.00417.02
8.0.160.0000.00817.07
8.0.150.0050.00216.98
8.0.140.0000.00716.99
8.0.130.0000.00713.48
8.0.120.0000.00717.08
8.0.110.0050.00317.00
8.0.100.0030.00617.04
8.0.90.0040.00416.96
8.0.80.0070.00717.05
8.0.70.0080.00017.06
8.0.60.0030.00517.02
8.0.50.0040.00416.88
8.0.30.0100.00817.18
8.0.20.0160.00517.42
8.0.10.0040.00417.13
8.0.00.0100.00816.89
7.4.330.0000.00516.79
7.4.320.0000.00716.64
7.4.300.0000.00616.54
7.4.290.0000.00716.69
7.4.280.0000.00816.60
7.4.270.0090.00016.66
7.4.260.0080.00316.62
7.4.250.0040.00416.59
7.4.240.0040.00416.52
7.4.230.0000.00716.51
7.4.220.0170.01216.71
7.4.210.0090.00716.78
7.4.200.0030.00516.61
7.4.160.0060.01016.77
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0120.00916.66
7.4.120.0170.00716.46
7.4.110.0030.01316.55
7.4.100.0060.01616.56
7.4.90.0130.00316.53
7.4.80.0060.01219.39
7.4.70.0120.00616.71
7.4.60.0070.01016.52
7.4.50.0070.00716.48
7.4.40.0140.00316.52
7.4.30.0100.00716.63
7.4.00.0070.00714.98
7.3.330.0000.00513.36
7.3.320.0060.00013.36
7.3.310.0070.00016.46
7.3.300.0000.00716.52
7.3.290.0030.00316.52
7.3.280.0070.00816.50
7.3.270.0110.00717.40
7.3.260.0110.00616.76
7.3.250.0090.00916.47
7.3.240.0090.00816.50
7.3.230.0170.00016.54
7.3.210.0140.00316.69
7.3.200.0100.01316.82
7.3.190.0130.00316.73
7.3.180.0130.00316.77
7.3.170.0150.00516.49
7.3.160.0100.00716.49
7.3.00.0030.01116.66
7.2.330.0090.00916.91
7.2.320.0060.01216.85
7.2.310.0090.00916.97
7.2.300.0130.00616.98
7.2.290.0130.00316.66
7.2.130.0100.00317.04
7.2.120.0070.00716.86
7.2.110.0070.00416.95
7.2.100.0030.00916.85
7.2.90.0080.00316.89
7.2.80.0130.00317.08
7.2.70.0100.00716.87
7.2.60.0060.00616.84
7.2.50.0000.01316.97
7.2.40.0080.00816.86
7.2.30.0060.00917.06
7.2.20.0030.01316.99
7.2.10.0060.00916.90
7.2.00.0050.00818.36
7.1.250.0000.01015.90
7.1.240.0000.01215.48
7.1.230.0040.00715.58
7.1.220.0050.00815.99
7.1.210.0040.01115.89
7.1.200.0040.00815.58
7.1.190.0070.00715.98
7.1.180.0030.01015.77
7.1.170.0060.00315.87
7.1.160.0000.01215.95
7.1.150.0070.00715.86
7.1.140.0110.00015.94
7.1.130.0070.00715.78
7.1.120.0110.00015.95
7.1.110.0130.00015.96
7.1.100.0030.00917.15
7.1.90.0060.00315.75
7.1.80.0040.00715.83
7.1.70.0040.00616.41
7.1.60.0070.01417.56
7.1.50.0030.01016.34
7.1.40.0000.01315.86
7.1.30.0050.00515.82
7.1.20.0030.00715.77
7.1.10.0060.00915.76
7.1.00.0000.04718.95
7.0.330.0040.00715.16
7.0.320.0030.00715.54
7.0.310.0030.01015.48
7.0.300.0090.00015.03
7.0.290.0080.00315.32
7.0.280.0090.00315.45
7.0.270.0070.00415.38
7.0.260.0100.00315.39
7.0.250.0030.00915.49
7.0.240.0060.00615.21
7.0.230.0040.00415.52
7.0.220.0070.00315.39
7.0.210.0030.00615.39
7.0.200.0210.00715.28
7.0.190.0030.00715.39
7.0.180.0070.00315.61
7.0.170.0060.00615.30
7.0.160.0060.00615.15
7.0.150.0030.01015.33
7.0.140.0030.00515.32
7.0.130.0080.00415.54
7.0.120.0000.01415.63
7.0.110.0060.00615.42
7.0.100.0110.00415.48
7.0.90.0380.04017.71
7.0.80.0260.02317.76
7.0.70.0270.03717.78
7.0.60.0250.04217.74
7.0.50.0090.04517.95
7.0.40.0100.03016.82
7.0.30.0070.04916.91
7.0.20.0070.04216.75
7.0.10.0050.04616.74
7.0.00.0070.04416.85
5.6.380.0150.00014.26
5.6.370.0110.00414.26
5.6.360.0080.00414.39
5.6.350.0120.00414.41
5.6.340.0030.01114.31
5.6.330.0060.00614.58
5.6.320.0080.00614.70
5.6.310.0090.00014.66
5.6.300.0040.01114.26
5.6.290.0030.00614.17
5.6.280.0050.03317.73
5.6.270.0070.00714.61
5.6.260.0100.00714.41
5.6.250.0060.00614.57
5.6.240.0100.04417.72
5.6.230.0030.04717.62
5.6.220.0070.02217.54
5.6.210.0070.03017.53
5.6.200.0050.04817.70
5.6.190.0110.03917.75
5.6.180.0050.04817.81
5.6.170.0090.04117.69
5.6.160.0110.04117.87
5.6.150.0090.02317.87
5.6.140.0100.03817.79
5.6.130.0070.02717.82
5.6.120.0040.03217.91
5.6.110.0030.04017.82
5.6.100.0110.04117.89
5.6.90.0100.04417.69
5.6.80.0060.02617.36
5.6.70.0140.03717.60
5.6.60.0030.03217.42
5.6.50.0050.03717.48
5.6.40.0050.04317.40
5.6.30.0080.04017.41
5.6.20.0050.04417.32
5.6.10.0150.02517.41
5.6.00.0110.04117.58
5.5.380.0070.05015.78
5.5.370.0050.04815.90
5.5.360.0020.02315.86
5.5.350.0060.03015.87
5.5.340.0080.03816.04
5.5.330.0050.03015.90
5.5.320.0030.03316.03
5.5.310.0100.03716.03
5.5.300.0020.04815.96
5.5.290.0070.04216.14
5.5.280.0080.02215.89
5.5.270.0080.04216.05
5.5.260.0080.04216.01
5.5.250.0050.03915.85
5.5.240.0070.03515.56
5.5.230.0050.03515.60
5.5.220.0030.02515.74
5.5.210.0090.03515.65
5.5.200.0070.03815.68
5.5.190.0090.04115.82
5.5.180.0110.03615.79
5.5.170.0000.00911.14
5.5.160.0070.02715.67
5.5.150.0020.04615.61
5.5.140.0030.04315.80
5.5.130.0050.04115.62
5.5.120.0070.04015.56
5.5.110.0070.04415.71
5.5.100.0100.03015.57
5.5.90.0090.04015.54
5.5.80.0080.03715.67
5.5.70.0050.04515.58
5.5.60.0080.04015.60
5.5.50.0050.04215.57
5.5.40.0070.03915.36
5.5.30.0030.03915.58
5.5.20.0060.04415.64
5.5.10.0050.04315.64
5.5.00.0050.04315.70

preferences:
34.37 ms | 401 KiB | 5 Q