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($string, 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.0110.01118.68
8.3.50.0140.00417.92
8.3.40.0150.00618.77
8.3.30.0110.00418.67
8.3.20.0070.00020.21
8.3.10.0040.00420.64
8.3.00.0000.00923.48
8.2.180.0100.01016.88
8.2.170.0110.00322.96
8.2.160.0100.00322.18
8.2.150.0030.00524.18
8.2.140.0030.00524.66
8.2.130.0080.00021.07
8.2.120.0040.00426.35
8.2.110.0070.01121.18
8.2.100.0070.00417.78
8.2.90.0000.00817.75
8.2.80.0040.00418.97
8.2.70.0000.00817.67
8.2.60.0090.00017.93
8.2.50.0030.00518.10
8.2.40.0040.00420.59
8.2.30.0000.00719.30
8.2.20.0060.00317.74
8.2.10.0000.00717.96
8.2.00.0040.00418.12
8.1.280.0070.00725.92
8.1.270.0110.00422.19
8.1.260.0050.00328.09
8.1.250.0000.00728.09
8.1.240.0030.00624.01
8.1.230.0040.00718.97
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0090.00317.35
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0040.00418.39
8.1.160.0000.00822.09
8.1.150.0070.00018.77
8.1.140.0050.00319.44
8.1.130.0000.00717.69
8.1.120.0070.00017.43
8.1.110.0030.00317.38
8.1.100.0040.00417.32
8.1.90.0030.00517.46
8.1.80.0090.00017.44
8.1.70.0030.00317.38
8.1.60.0000.00817.54
8.1.50.0060.00317.52
8.1.40.0050.00317.55
8.1.30.0040.00417.61
8.1.20.0040.00417.48
8.1.10.0040.00417.60
8.1.00.0040.00417.38
8.0.300.0050.00218.77
8.0.290.0020.00516.75
8.0.280.0030.00518.48
8.0.270.0030.00317.21
8.0.260.0040.00417.22
8.0.250.0000.00817.01
8.0.240.0030.00316.98
8.0.230.0070.00016.86
8.0.220.0030.00316.93
8.0.210.0040.00416.88
8.0.200.0030.00316.94
8.0.190.0030.00516.88
8.0.180.0070.00016.92
8.0.170.0040.00417.02
8.0.160.0070.00017.01
8.0.150.0030.00616.87
8.0.140.0000.00716.84
8.0.130.0060.00013.32
8.0.120.0040.00416.85
8.0.110.0070.00016.88
8.0.100.0000.00716.84
8.0.90.0000.00816.91
8.0.80.0030.01316.89
8.0.70.0000.00716.71
8.0.60.0000.00716.76
8.0.50.0000.00716.73
8.0.30.0080.00917.12
8.0.20.0140.00817.40
8.0.10.0000.00717.00
8.0.00.0120.00716.75
7.4.330.0050.00016.77
7.4.320.0000.00816.41
7.4.300.0000.00616.52
7.4.290.0100.00016.47
7.4.280.0040.00416.50
7.4.270.0000.00816.51
7.4.260.0000.00816.54
7.4.250.0040.00416.55
7.4.240.0000.00816.50
7.4.230.0000.00816.64
7.4.220.0160.00316.71
7.4.210.0060.01116.64
7.4.200.0040.00416.64
7.4.160.0090.00916.58
7.4.150.0070.01117.40
7.4.140.0110.00817.86
7.4.130.0080.01116.43
7.4.120.0070.01216.55
7.4.110.0130.00716.51
7.4.100.0120.00616.56
7.4.90.0070.01016.46
7.4.80.0200.00019.39
7.4.70.0070.01016.59
7.4.60.0090.01216.59
7.4.50.0100.00716.49
7.4.40.0110.00616.72
7.4.30.0100.00716.56
7.4.00.0060.00614.87
7.3.330.0000.00513.17
7.3.320.0020.00213.10
7.3.310.0000.00716.41
7.3.300.0000.00716.31
7.3.290.0030.00316.18
7.3.280.0050.01116.26
7.3.270.0120.00617.40
7.3.260.0090.00816.51
7.3.250.0090.00916.34
7.3.240.0120.00516.43
7.3.230.0070.01416.56
7.3.210.0110.01116.48
7.3.200.0060.01116.30
7.3.190.0150.00016.22
7.3.180.0120.00616.33
7.3.170.0030.01416.46
7.3.160.0120.00916.29
7.2.330.0070.01016.43
7.2.320.0100.00716.53
7.2.310.0100.00716.47
7.2.300.0070.01016.47
7.2.290.0110.00616.34
7.2.60.0070.00716.61
7.2.00.0090.00318.93
7.1.200.0060.00915.68
7.1.100.0000.01217.94
7.1.70.0030.01016.74
7.1.60.0170.00719.24
7.1.50.0100.00316.75
7.1.00.0030.07722.37
7.0.200.0310.00714.80
7.0.60.0400.07319.80
7.0.50.0100.03317.85
7.0.40.0030.07320.07
7.0.30.0400.06020.30
7.0.20.0230.05020.16
7.0.10.0100.08720.10
7.0.00.0070.08720.19
5.6.280.0030.06721.02
5.6.210.0030.04020.59
5.6.200.0030.04018.17
5.6.190.0070.04020.67
5.6.180.0230.05020.77
5.6.170.0200.04720.47
5.6.160.0170.08020.71
5.6.150.0070.04318.17
5.6.140.0130.07718.13
5.6.130.0100.05018.23
5.6.120.0100.07321.01
5.6.110.0000.07321.15
5.6.100.0100.08021.02
5.6.90.0170.07321.01
5.6.80.0130.08020.43
5.5.350.0270.03720.34
5.5.340.0070.05718.09
5.5.330.0030.09320.29
5.5.320.0600.06720.24
5.5.310.0200.04020.34
5.5.300.0000.05017.95
5.5.290.0100.07017.97
5.5.280.0130.07720.66
5.5.270.0070.06020.95
5.5.260.0030.04020.88
5.5.250.0130.04320.65
5.5.240.0000.08720.19

preferences:
59.8 ms | 400 KiB | 5 Q