3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Task 1: Decode secret word * * $data variable (defined below) is an array of digits, that represents binary data. Every element of array * is a single-byte char code. * * The task is to decompress gzipped binary data, then to decode the result as base 64 encoded string and * to print to output the result string - this is a secret word. * */ $data = [120, 156, 11, 204, 13, 43, 142, 140, 240, 50, 76, 174, 116, 181, 5, 0, 27, 141, 4, 18]; $string = ''; foreach ($data as $char) { $string .= chr($char); } echo base64_decode(gzuncompress($string));

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.0130.00618.18
8.3.50.0160.00018.19
8.3.40.0110.00418.79
8.3.30.0070.00718.70
8.3.20.0090.00620.38
8.3.10.0030.00621.87
8.3.00.0000.00819.79
8.2.180.0110.00416.88
8.2.170.0060.01222.96
8.2.160.0030.01019.47
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00821.07
8.2.120.0020.00526.35
8.2.110.0040.00721.18
8.2.100.0060.00618.16
8.2.90.0060.00319.17
8.2.80.0040.00417.97
8.2.70.0080.00017.75
8.2.60.0080.00018.05
8.2.50.0000.00818.10
8.2.40.0040.00420.47
8.2.30.0030.00521.22
8.2.20.0020.00517.79
8.2.10.0040.00418.23
8.2.00.0000.00717.96
8.1.280.0090.00625.92
8.1.270.0070.00023.79
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0000.00921.42
8.1.230.0080.00419.73
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0000.01117.35
8.1.190.0050.00317.35
8.1.180.0080.00018.10
8.1.170.0080.00018.65
8.1.160.0030.00522.23
8.1.150.0000.00718.87
8.1.140.0000.00719.65
8.1.130.0070.00017.65
8.1.120.0030.00317.48
8.1.110.0030.00517.52
8.1.100.0000.00717.55
8.1.90.0030.00617.44
8.1.80.0030.00317.50
8.1.70.0030.00317.40
8.1.60.0000.00717.60
8.1.50.0030.00617.59
8.1.40.0060.00317.47
8.1.30.0080.00017.73
8.1.20.0000.00717.53
8.1.10.0000.00817.59
8.1.00.0080.00017.53
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0000.00718.54
8.0.270.0050.00317.29
8.0.260.0040.00417.16
8.0.250.0040.00416.89
8.0.240.0000.00716.97
8.0.230.0000.00717.00
8.0.220.0000.00716.82
8.0.210.0000.00616.94
8.0.200.0050.00516.86
8.0.190.0100.00016.93
8.0.180.0040.00416.98
8.0.170.0030.00516.92
8.0.160.0030.00317.00
8.0.150.0000.00716.91
8.0.140.0050.00516.92
8.0.130.0050.00013.36
8.0.120.0000.00816.94
8.0.110.0000.00816.81
8.0.100.0030.00617.04
8.0.90.0070.00016.93
8.0.80.0090.00916.87
8.0.70.0080.00016.80
8.0.60.0050.00217.00
8.0.50.0040.00416.74
8.0.30.0050.01317.14
8.0.20.0080.01217.40
8.0.10.0050.00317.10
8.0.00.0150.00816.79
7.4.330.0060.00015.17
7.4.320.0000.00716.70
7.4.300.0030.00316.53
7.4.290.0030.00316.66
7.4.280.0000.00816.38
7.4.270.0000.00716.49
7.4.260.0000.00716.62
7.4.250.0070.00016.42
7.4.240.0070.00016.68
7.4.230.0070.00016.38
7.4.220.0110.00716.64
7.4.210.0060.00816.53
7.4.200.0030.00516.73
7.4.160.0100.00816.53
7.4.150.0070.01117.40
7.4.140.0100.00817.86
7.4.130.0120.00516.55
7.4.120.0130.00616.44
7.4.110.0110.00716.69
7.4.100.0090.00916.43
7.4.90.0100.00716.55
7.4.80.0030.01319.39
7.4.70.0090.00616.45
7.4.60.0000.01516.57
7.4.50.0070.01016.46
7.4.40.0120.00916.69
7.4.30.0070.01516.61
7.4.00.0060.00814.93
7.3.330.0000.00513.17
7.3.320.0050.00013.11
7.3.310.0030.00316.15
7.3.300.0030.00616.19
7.3.290.0030.00316.24
7.3.280.0080.01016.27
7.3.270.0140.00317.40
7.3.260.0070.00916.63
7.3.250.0130.01216.59
7.3.240.0070.01016.30
7.3.230.0120.00616.53
7.3.210.0100.00716.53
7.3.200.0100.00716.61
7.3.190.0000.01516.25
7.3.180.0120.00916.35
7.3.170.0130.00616.36
7.3.160.0100.00716.36
7.3.10.0030.01016.73
7.3.00.0030.00516.65
7.2.330.0180.00416.47
7.2.320.0060.00916.77
7.2.310.0110.00516.64
7.2.300.0090.00916.47
7.2.290.0060.00916.53
7.2.130.0030.00817.07
7.2.120.0000.01116.96
7.2.110.0030.01017.07
7.2.100.0120.00316.81
7.2.90.0080.00316.98
7.2.80.0070.00716.89
7.2.70.0060.00317.12
7.2.60.0000.01316.98
7.2.50.0090.00617.02
7.2.40.0100.00616.87
7.2.30.0030.01117.03
7.2.20.0030.01016.75
7.2.10.0090.00316.80
7.2.00.0020.01118.18
7.1.250.0000.00916.07
7.1.240.0110.00015.67
7.1.230.0070.00715.75
7.1.220.0040.00415.75
7.1.210.0080.00315.47
7.1.200.0060.00515.82
7.1.190.0060.00615.80
7.1.180.0050.00815.94
7.1.170.0060.00615.79
7.1.160.0060.00916.03
7.1.150.0070.00415.87
7.1.140.0030.00715.90
7.1.130.0030.00715.83
7.1.120.0090.00315.82
7.1.110.0050.00515.94
7.1.100.0070.00715.61
7.1.90.0000.01415.91
7.1.80.0060.00615.82
7.1.70.0010.01016.47
7.1.60.0040.00917.71
7.1.50.0040.00715.84
7.1.40.0030.01015.90
7.1.30.0030.00715.94
7.1.20.0050.00515.73
7.1.10.0060.00615.86
7.1.00.0050.04319.02
7.0.330.0060.00615.38
7.0.320.0070.00315.58
7.0.310.0030.00615.04
7.0.300.0070.00715.43
7.0.290.0030.00715.49
7.0.280.0030.00715.46
7.0.270.0030.00915.51
7.0.260.0030.00615.33
7.0.250.0060.00915.27
7.0.240.0000.01115.35
7.0.230.0000.01115.03
7.0.220.0000.01115.34
7.0.210.0000.01415.37
7.0.200.0100.00815.77
7.0.190.0030.00615.41
7.0.180.0070.00015.40
7.0.170.0040.00815.48
7.0.160.0040.00815.32
7.0.150.0070.00715.38
7.0.140.0030.01015.35
7.0.130.0030.01015.21
7.0.120.0040.01115.25
7.0.110.0090.00615.44
7.0.100.0000.00915.14
7.0.90.0030.01015.19
7.0.80.0100.03217.62
7.0.70.0180.02517.66
7.0.60.0140.02717.64
7.0.50.0100.03917.74
7.0.40.0080.04516.86
7.0.30.0070.03516.99
7.0.20.0060.03516.74
7.0.10.0090.03216.78
7.0.00.0100.04316.80
5.6.380.0000.01114.61
5.6.370.0100.00313.98
5.6.360.0040.00414.26
5.6.350.0030.00714.46
5.6.340.0000.01014.16
5.6.330.0040.00714.41
5.6.320.0000.00713.96
5.6.310.0030.00914.46
5.6.300.0030.01013.87
5.6.290.0030.01014.61
5.6.280.0120.00314.29
5.6.270.0030.01014.50
5.6.260.0060.00914.19
5.6.250.0030.01314.33
5.6.240.0060.00614.28
5.6.230.0130.03217.38
5.6.220.0050.03917.39
5.6.210.0100.03017.58
5.6.200.0080.03617.68
5.6.190.0070.03217.73
5.6.180.0070.03917.84
5.6.170.0050.03617.79
5.6.160.0150.03517.64
5.6.150.0110.04217.77
5.6.140.0110.03417.66
5.6.130.0050.03817.83
5.6.120.0190.02517.67
5.6.110.0040.04117.91
5.6.100.0060.03817.72
5.6.90.0080.03517.74
5.6.80.0150.02517.48
5.6.70.0070.03217.31
5.6.60.0090.03317.26
5.6.50.0040.03717.39
5.6.40.0130.02617.29
5.6.30.0070.03817.43
5.6.20.0100.03017.31
5.6.10.0070.03217.34
5.6.00.0130.02917.54
5.5.380.0000.00610.89
5.5.370.0030.00310.65
5.5.360.0060.00611.25
5.5.350.0000.01011.05
5.5.340.0060.00611.36
5.5.330.0000.01111.30
5.5.320.0030.00310.83
5.5.310.0060.00311.06
5.5.300.0080.00011.30
5.5.290.0050.00311.14
5.5.280.0060.00611.09
5.5.270.0060.00011.09
5.5.260.0030.00811.30
5.5.250.0000.00811.12
5.5.240.0030.00810.81
5.5.230.0050.00511.00
5.5.220.0000.00511.07
5.5.210.0000.00910.84
5.5.200.0000.00810.95
5.5.190.0030.00311.05
5.5.180.0030.00310.66
5.5.170.0080.00311.11
5.5.160.0030.00710.72
5.5.150.0060.00611.18
5.5.140.0030.00711.12
5.5.130.0040.00811.17
5.5.120.0020.00211.05
5.5.110.0000.00710.98
5.5.100.0030.00710.83
5.5.90.0000.01110.89
5.5.80.0050.00010.79
5.5.70.0000.00510.82
5.5.60.0000.00710.78
5.5.50.0000.00710.96
5.5.40.0000.00910.82
5.5.30.0000.00910.60
5.5.20.0030.00310.91
5.5.10.0030.00310.81
5.5.00.0000.01211.04

preferences:
79 ms | 400 KiB | 5 Q