3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode_string_array ($stringArray) { $s = strtr(base64_encode(addslashes(gzcompress(serialize($stringArray),9))), '+/=', '-_,'); return $s; } function decode_string_array ($stringArray) { $s = unserialize(gzuncompress(stripslashes(base64_decode(strtr($stringArray, '-_,', '+/='))))); return $s; } $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" } ]}'; $pass = '1234'; $method = 'aes128'; $iv = "1234567812345678"; $str = "sample data"; $bzstr = bzcompress($str, 9); echo $bzstr; ?>

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.00918.43
8.3.50.0120.00618.05
8.3.40.0180.00318.71
8.3.30.0090.00618.79
8.3.20.0040.00420.34
8.3.10.0080.00020.42
8.3.00.0060.00321.73
8.2.180.0030.01717.00
8.2.170.0090.00622.96
8.2.160.0030.01022.13
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00420.94
8.2.120.0000.00726.35
8.2.110.0120.00619.02
8.2.100.0040.00717.93
8.2.90.0000.00819.27
8.2.80.0000.00817.97
8.2.70.0000.00917.63
8.2.60.0050.00317.80
8.2.50.0080.00018.09
8.2.40.0000.01120.59
8.2.30.0000.00719.39
8.2.20.0040.00417.65
8.2.10.0040.00418.13
8.2.00.0070.00017.98
8.1.280.0040.01125.92
8.1.270.0090.00922.14
8.1.260.0050.00228.09
8.1.250.0000.00828.09
8.1.240.0060.00323.95
8.1.230.0110.00017.70
8.1.220.0030.00617.79
8.1.210.0050.00318.77
8.1.200.0060.00317.35
8.1.190.0050.00317.22
8.1.180.0030.00518.10
8.1.170.0030.00718.52
8.1.160.0000.00720.63
8.1.150.0040.00418.89
8.1.140.0080.00019.53
8.1.130.0000.00817.56
8.1.120.0070.00017.34
8.1.110.0070.00017.43
8.1.100.0000.00717.32
8.1.90.0030.00617.29
8.1.80.0000.00917.41
8.1.70.0000.00717.43
8.1.60.0060.00317.54
8.1.50.0030.00617.43
8.1.40.0020.00517.39
8.1.30.0050.00317.56
8.1.20.0040.00417.40
8.1.10.0000.00717.63
8.1.00.0040.00417.50
8.0.300.0050.00218.77
8.0.290.0000.00716.75
8.0.280.0000.00718.39
8.0.270.0040.00417.11
8.0.260.0030.00317.12
8.0.250.0040.00416.95
8.0.240.0070.00016.90
8.0.230.0000.00816.86
8.0.220.0030.00316.82
8.0.210.0060.00316.92
8.0.200.0030.00316.96
8.0.190.0040.00416.88
8.0.180.0000.00716.91
8.0.170.0040.00416.93
8.0.160.0000.00716.89
8.0.150.0050.00316.93
8.0.140.0050.00216.84
8.0.130.0030.00313.29
8.0.120.0000.00816.89
8.0.110.0080.00016.88
8.0.100.0000.00816.85
8.0.90.0080.00016.73
8.0.80.0160.00616.84
8.0.70.0030.00616.79
8.0.60.0000.00716.89
8.0.50.0050.00216.95
8.0.30.0100.00616.93
8.0.20.0070.01017.40
8.0.10.0000.00817.03
8.0.00.0070.01116.98
7.4.330.0000.00616.89
7.4.320.0050.00216.38
7.4.300.0000.00716.54
7.4.290.0070.00316.44
7.4.280.0000.00816.60
7.4.270.0050.00616.59
7.4.260.0050.00316.52
7.4.250.0050.00216.41
7.4.240.0040.00416.55
7.4.230.0000.00716.71
7.4.220.0070.01016.53
7.4.210.0090.00716.68
7.4.200.0070.00016.40
7.4.160.0090.00616.51
7.4.150.0090.00917.40
7.4.140.0090.01217.86
7.4.130.0080.00916.43
7.4.120.0080.01316.62
7.4.110.0140.00716.52
7.4.100.0130.01016.52
7.4.90.0150.00416.41
7.4.80.0130.00319.39
7.4.70.0120.00316.70
7.4.60.0170.00716.51
7.4.50.0030.01016.40
7.4.40.0100.01016.44
7.4.30.0060.01016.43
7.4.00.0000.01815.09
7.3.330.0030.00313.27
7.3.320.0000.00513.31
7.3.310.0020.00516.18
7.3.300.0070.00016.32
7.3.290.0030.00316.20
7.3.280.0070.00916.27
7.3.270.0100.00717.40
7.3.260.0090.00916.28
7.3.250.0070.01116.47
7.3.240.0090.01116.62
7.3.230.0080.00816.42
7.3.210.0120.00916.44
7.3.200.0130.01016.27
7.3.190.0090.00616.25
7.3.180.0090.00916.38
7.3.170.0070.01116.46
7.3.160.0100.00716.53
7.2.330.0100.00716.23
7.2.320.0070.01016.66
7.2.310.0120.00616.59
7.2.300.0080.00816.22
7.2.290.0130.00316.39
7.2.60.0060.00916.62
7.2.00.0000.01018.89
7.1.200.0060.00615.56
7.1.100.0000.01618.03
7.1.70.0030.00517.11
7.1.60.0090.01519.24
7.1.50.0030.00916.43
7.1.00.0030.07722.43
7.0.200.0320.00414.69
7.0.60.0430.07020.07
7.0.50.0000.04317.97
7.0.40.0030.04320.20
7.0.30.0530.06720.23
7.0.20.0300.08020.16
7.0.10.0070.04320.23
7.0.00.0130.05020.08
5.6.280.0030.03320.83
5.6.210.0030.04320.62
5.6.200.0070.07018.29
5.6.190.0070.04020.49
5.6.180.0300.07320.79
5.6.170.0230.04020.55
5.6.160.0070.09020.52
5.6.150.0130.07318.28
5.6.140.0070.04018.18
5.6.130.0070.07718.14
5.6.120.0070.07021.13
5.6.110.0100.05320.92
5.6.100.0070.08320.88
5.6.90.0030.08320.98
5.6.80.0070.07020.55
5.5.350.0230.04020.39
5.5.340.0070.04017.94
5.5.330.0030.08720.43
5.5.320.0530.04320.30
5.5.310.0200.04020.30
5.5.300.0070.08018.06
5.5.290.0070.04017.99
5.5.280.0070.08320.88
5.5.270.0130.07320.89
5.5.260.0070.04020.87
5.5.250.0100.08020.50
5.5.240.0000.07720.03

preferences:
70.34 ms | 400 KiB | 5 Q