3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=63898 $key = "Foo " . chr(163); $array = array($key => ""); var_dump($array); $json = json_encode($array); var_dump($json); $array2 = array($key); var_dump($array2, json_encode($array2)); var_dump(json_encode('hey now you’re dumb')); /* $x = 'Audio Pass: Get live NFL game audio while you’re on the road with Audio Pass.'; var_dump(htmlentities($x)); var_dump(htmlentities($x, ENT_COMPAT | ENT_SUBSTITUTE, 'ISO-8859-1')); var_dump(htmlentities($x, ENT_COMPAT | ENT_SUBSTITUTE, 'UTF-8')); */

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.0000.01418.55
8.3.50.0140.00322.88
8.3.40.0070.01018.72
8.3.30.0110.00418.97
8.3.20.0080.00020.16
8.3.10.0000.00823.39
8.3.00.0080.00019.22
8.2.180.0180.00018.31
8.2.170.0140.00422.96
8.2.160.0040.01120.25
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00721.01
8.2.110.0060.00320.53
8.2.100.0080.00417.91
8.2.90.0050.00318.34
8.2.80.0060.00317.97
8.2.70.0000.00917.50
8.2.60.0030.00518.05
8.2.50.0050.00318.07
8.2.40.0050.00318.16
8.2.30.0030.00618.12
8.2.20.0040.00417.65
8.2.10.0050.00218.16
8.2.00.0040.00417.77
8.1.280.0110.00725.92
8.1.270.0080.00023.67
8.1.260.0000.00726.35
8.1.250.0050.00228.09
8.1.240.0030.00622.14
8.1.230.0060.00620.91
8.1.220.0060.00317.78
8.1.210.0040.00418.85
8.1.200.0110.00017.35
8.1.190.0050.00317.22
8.1.180.0000.00818.10
8.1.170.0040.00418.49
8.1.160.0000.00721.86
8.1.150.0000.00718.83
8.1.140.0040.00417.35
8.1.130.0030.00317.86
8.1.120.0040.00417.44
8.1.110.0000.00717.35
8.1.100.0070.00017.36
8.1.90.0070.00017.44
8.1.80.0050.00217.41
8.1.70.0000.00717.39
8.1.60.0080.00417.63
8.1.50.0000.00817.39
8.1.40.0060.00317.47
8.1.30.0030.00517.59
8.1.20.0080.00017.63
8.1.10.0040.00417.59
8.1.00.0050.00317.36
8.0.300.0030.00320.08
8.0.290.0060.00316.58
8.0.280.0000.00718.30
8.0.270.0070.00017.24
8.0.260.0030.00317.15
8.0.250.0000.00716.80
8.0.240.0040.00416.96
8.0.230.0040.00416.82
8.0.220.0000.00716.78
8.0.210.0040.00416.84
8.0.200.0000.00616.81
8.0.190.0040.00416.95
8.0.180.0040.00416.92
8.0.170.0040.00416.78
8.0.160.0000.00716.91
8.0.150.0000.00816.83
8.0.140.0040.00416.84
8.0.130.0000.00613.30
8.0.120.0000.00816.88
8.0.110.0030.00516.91
8.0.100.0050.00316.94
8.0.90.0040.00416.81
8.0.80.0060.00916.93
8.0.70.0000.00816.84
8.0.60.0040.00416.76
8.0.50.0040.00416.89
8.0.30.0130.01017.07
8.0.20.0080.01217.40
8.0.10.0050.00316.82
8.0.00.0110.00816.61
7.4.330.0000.00615.21
7.4.320.0000.00616.57
7.4.300.0060.00016.40
7.4.290.0030.00316.56
7.4.280.0020.00516.57
7.4.270.0030.00616.50
7.4.260.0030.00316.33
7.4.250.0040.00416.53
7.4.240.0030.00316.58
7.4.230.0070.00016.66
7.4.220.0120.00516.70
7.4.210.0060.00716.49
7.4.200.0000.00716.45
7.4.160.0060.01716.56
7.4.150.0060.01217.40
7.4.140.0120.00817.86
7.4.130.0130.00616.49
7.4.120.0100.00716.59
7.4.110.0030.01316.47
7.4.100.0180.00416.47
7.4.90.0110.00616.48
7.4.80.0090.00919.39
7.4.70.0090.00916.58
7.4.60.0120.00616.24
7.4.50.0000.00816.64
7.4.40.0120.00616.34
7.4.30.0060.00916.51
7.4.00.0120.00314.89
7.3.330.0000.00613.14
7.3.320.0060.00013.15
7.3.310.0040.00416.10
7.3.300.0000.00616.05
7.3.290.0100.00716.29
7.3.280.0080.01116.26
7.3.270.0140.00617.40
7.3.260.0150.00616.38
7.3.250.0120.00716.57
7.3.240.0040.01716.50
7.3.230.0120.00616.50
7.3.210.0140.00616.31
7.3.200.0110.00719.39
7.3.190.0060.01116.44
7.3.180.0000.01516.10
7.3.170.0060.00916.36
7.3.160.0030.01216.39
7.2.330.0090.00916.48
7.2.320.0120.00916.45
7.2.310.0130.00616.63
7.2.300.0120.00616.51
7.2.290.0100.00716.64
7.1.70.0050.00217.22
7.1.60.0150.00919.46
7.1.50.0180.00317.12
7.1.00.0000.08022.28
7.0.200.0000.00916.73
7.0.140.0070.07022.08
7.0.90.0030.04719.84
7.0.80.0070.04719.82
7.0.70.0030.04320.14
7.0.60.0100.08719.73
7.0.50.0070.08720.23
7.0.40.0030.08720.14
7.0.30.0070.06720.11
7.0.20.0030.08319.95
7.0.10.0130.08020.10
7.0.00.0070.06720.17
5.6.280.0000.07721.14
5.6.240.0070.05020.67
5.6.230.0030.07020.48
5.6.220.0070.04320.66
5.6.210.0070.08320.46
5.6.200.0070.06321.05
5.6.190.0130.08021.04
5.6.180.0100.07321.00
5.6.170.0100.07720.95
5.6.160.0100.08021.03
5.6.150.0000.08321.03
5.6.140.0100.03721.00
5.6.130.0130.03321.09
5.6.120.0070.08721.16
5.6.110.0130.08021.02
5.6.100.0070.04721.04
5.6.90.0030.05321.14
5.6.80.0100.06320.42
5.6.70.0000.04320.50
5.6.60.0100.07320.47
5.6.50.0070.04320.51
5.6.40.0130.07320.37
5.6.30.0130.07320.47
5.6.20.0070.04020.51
5.6.10.0100.03320.36
5.6.00.0100.07320.45
5.5.380.0070.08020.41
5.5.370.0100.03720.58
5.5.360.0100.07320.35
5.5.350.0100.09320.44
5.5.340.0200.06720.90
5.5.330.0130.06320.85
5.5.320.0170.06020.80
5.5.310.0130.04720.84
5.5.300.0100.08020.80
5.5.290.0030.06020.89
5.5.280.0200.07320.85
5.5.270.0130.07720.86
5.5.260.0100.04020.75
5.5.250.0030.08020.56
5.5.240.0000.04320.29
5.5.230.0070.06020.16
5.5.220.0070.04320.28
5.5.210.0170.07020.24
5.5.200.0100.07020.12
5.5.190.0170.03320.27
5.5.180.0070.07320.22
5.5.160.0170.05720.23
5.5.150.0070.05020.14
5.5.140.0070.07720.23
5.5.130.0070.07020.23
5.5.120.0030.07020.26
5.5.110.0070.06320.26
5.5.100.0100.03320.07
5.5.90.0130.08020.09
5.5.80.0030.05020.06
5.5.70.0030.04720.05
5.5.60.0070.08019.95
5.5.50.0100.07020.07
5.5.40.0070.07319.99
5.5.30.0030.07320.04
5.5.20.0100.07020.08
5.5.10.0100.05720.03
5.5.00.0100.06720.02
5.4.450.0100.05019.44
5.4.440.0030.09019.23
5.4.430.0030.08719.34
5.4.420.0030.07719.44
5.4.410.0070.05718.98
5.4.400.0200.06019.07
5.4.390.0030.04018.96
5.4.380.0170.03318.95
5.4.370.0100.06719.13
5.4.360.0070.08318.81
5.4.350.0030.07719.06
5.4.340.0030.06019.04
5.4.320.0030.08019.09
5.4.310.0170.06718.98
5.4.300.0070.08019.02
5.4.290.0000.04719.09
5.4.280.0070.04718.94
5.4.270.0030.07018.96
5.4.260.0070.04019.03
5.4.250.0070.07719.06
5.4.240.0030.07319.22
5.4.230.0100.05019.08
5.4.220.0170.06319.02
5.4.210.0200.05018.93
5.4.200.0100.06719.13
5.4.190.0070.07718.95
5.4.180.0130.07718.97
5.4.170.0130.07018.80
5.4.160.0130.06319.10
5.4.150.0100.03718.94
5.4.140.0030.04016.32
5.4.130.0030.05716.31
5.4.120.0030.07316.22
5.4.110.0130.05316.26
5.4.100.0130.06316.34
5.4.90.0030.05316.30
5.4.80.0100.03716.43
5.4.70.0030.05716.41
5.4.60.0000.04316.23
5.4.50.0070.07016.40
5.4.40.0030.04016.24
5.4.30.0100.07316.33
5.4.20.0030.07016.22
5.4.10.0030.07016.27
5.4.00.0000.04315.46
5.3.290.0070.04314.52
5.3.280.0030.04014.54
5.3.270.0100.07314.57
5.3.260.0130.04714.43
5.3.250.0100.03314.55
5.3.240.0100.06714.59
5.3.230.0030.05314.59
5.3.220.0030.05714.41
5.3.210.0070.07014.51
5.3.200.0130.05714.55
5.3.190.0070.07714.56
5.3.180.0000.08014.43
5.3.170.0030.04714.53
5.3.160.0100.06014.43
5.3.150.0000.07014.50
5.3.140.0030.06014.49
5.3.130.0130.06314.54
5.3.120.0170.06714.37
5.3.110.0030.08014.49
5.3.100.0130.07013.89
5.3.90.0100.05713.97
5.3.80.0030.04313.77
5.3.70.0130.06713.87
5.3.60.0030.04313.99
5.3.50.0130.05013.80
5.3.40.0070.06313.93
5.3.30.0100.06713.76
5.3.20.0030.06713.67
5.3.10.0130.03013.41
5.3.00.0030.04013.61
5.2.170.0030.03311.12
5.2.160.0030.06310.96
5.2.150.0000.04011.06
5.2.140.0030.08010.95
5.2.130.0070.03311.14
5.2.120.0030.06011.17
5.2.110.0030.03710.91
5.2.100.0070.02711.05
5.2.90.0030.03310.92
5.2.80.0100.04711.04
5.2.70.0030.06010.94
5.2.60.0030.05011.02
5.2.50.0030.05710.83
5.2.40.0070.05310.83
5.2.30.0070.05310.97
5.2.20.0000.04710.95
5.2.10.0070.05310.78
5.2.00.0070.03010.57
5.1.60.0030.05310.07
5.1.50.0030.05310.05
5.1.40.0030.04310.02
5.1.30.0030.05710.23
5.1.20.0100.05010.39
5.1.10.0070.05310.09
5.1.00.0030.04710.05
5.0.50.0000.0408.53
5.0.40.0000.0478.43
5.0.30.0100.0478.26
5.0.20.0030.0278.03
5.0.10.0030.0438.15
5.0.00.0000.0608.25
4.4.90.0030.0337.55
4.4.80.0070.0137.55
4.4.70.0070.0337.55
4.4.60.0030.0337.55
4.4.50.0030.0237.55
4.4.40.0000.0577.55
4.4.30.0000.0337.55
4.4.20.0030.0277.55
4.4.10.0030.0337.55
4.4.00.0030.0507.55
4.3.110.0000.0377.55
4.3.100.0000.0237.55
4.3.90.0030.0307.55
4.3.80.0070.0477.55
4.3.70.0000.0407.55
4.3.60.0070.0277.55
4.3.50.0070.0307.55
4.3.40.0000.0377.55
4.3.30.0000.0207.55
4.3.20.0000.0377.55
4.3.10.0000.0207.55
4.3.00.0000.0337.55

preferences:
40.98 ms | 401 KiB | 5 Q