3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=63898 $key = utf8_encode("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(utf8_encode('hey now ' . chr(180) . ' you’re dumb'))); var_dump(json_encode('hey now ' . chr(180) . ' 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.70.0070.00716.63
8.3.60.0060.00916.63
8.3.50.0100.00922.86
8.3.40.0070.01118.88
8.3.30.0060.00819.13
8.3.20.0040.00420.13
8.3.10.0030.00523.54
8.3.00.0080.00019.38
8.2.180.0140.00718.66
8.2.170.0000.01822.96
8.2.160.0090.00620.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0150.00426.16
8.2.120.0080.00020.98
8.2.110.0090.00020.53
8.2.100.0000.01218.22
8.2.90.0030.00519.29
8.2.80.0080.00317.97
8.2.70.0090.00017.75
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0070.00018.22
8.2.30.0070.00018.21
8.2.20.0000.00717.89
8.2.10.0000.00718.15
8.2.00.0070.00017.71
8.1.280.0070.00725.92
8.1.270.0030.00623.84
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0000.00823.85
8.1.230.0040.00719.08
8.1.220.0040.00417.76
8.1.210.0000.00918.77
8.1.200.0030.00717.22
8.1.190.0000.00917.13
8.1.180.0000.00819.01
8.1.170.0030.00618.54
8.1.160.0070.00021.97
8.1.150.0040.00418.91
8.1.140.0030.00517.35
8.1.130.0000.00717.89
8.1.120.0070.00017.45
8.1.110.0000.00717.46
8.1.100.0080.00017.36
8.1.90.0030.00317.45
8.1.80.0080.00317.37
8.1.70.0050.00317.50
8.1.60.0050.00317.48
8.1.50.0080.00017.44
8.1.40.0040.00517.50
8.1.30.0030.00517.56
8.1.20.0030.00517.60
8.1.10.0000.00717.52
8.1.00.0030.00617.51
8.0.300.0000.00818.77
8.0.290.0000.00716.75
8.0.280.0030.00318.38
8.0.270.0070.00017.29
8.0.260.0060.00017.21
8.0.250.0040.00416.92
8.0.240.0000.00716.96
8.0.230.0030.00517.02
8.0.220.0040.00416.82
8.0.210.0030.00316.91
8.0.200.0030.00316.98
8.0.190.0030.00516.93
8.0.180.0070.00016.87
8.0.170.0040.00416.93
8.0.160.0000.00816.81
8.0.150.0000.00716.81
8.0.140.0000.00716.78
8.0.130.0050.00013.30
8.0.120.0030.00716.89
8.0.110.0040.00416.82
8.0.100.0050.00316.98
8.0.90.0000.00716.93
8.0.80.0180.00016.92
8.0.70.0000.00716.71
8.0.60.0070.00016.83
8.0.50.0050.00316.82
8.0.30.0060.01217.13
8.0.20.0090.01017.42
8.0.10.0050.00316.97
8.0.00.0100.00916.79
7.4.330.0030.00315.07
7.4.320.0000.00616.60
7.4.300.0000.00616.52
7.4.290.0000.00716.52
7.4.280.0080.00016.52
7.4.270.0000.00716.46
7.4.260.0030.00316.63
7.4.250.0000.00816.50
7.4.240.0010.00616.59
7.4.230.0050.00316.74
7.4.220.0140.00416.64
7.4.210.0090.00616.63
7.4.200.0030.00316.43
7.4.160.0110.01116.67
7.4.150.0060.01217.40
7.4.140.0090.01317.86
7.4.130.0060.01016.44
7.4.120.0120.01116.47
7.4.110.0100.01016.45
7.4.100.0110.00716.55
7.4.90.0110.00616.41
7.4.80.0060.01519.39
7.4.70.0110.00716.56
7.4.60.0110.00616.39
7.4.50.0030.00516.55
7.4.40.0110.01116.68
7.4.30.0150.00616.41
7.4.00.0050.01214.87
7.3.330.0050.00013.17
7.3.320.0000.00513.07
7.3.310.0030.00316.23
7.3.300.0050.00316.30
7.3.290.0130.00716.31
7.3.280.0110.00816.28
7.3.270.0060.01017.40
7.3.260.0070.01416.26
7.3.250.0110.00716.49
7.3.240.0100.00716.21
7.3.230.0100.00716.39
7.3.210.0110.00816.61
7.3.200.0130.00819.39
7.3.190.0180.00316.35
7.3.180.0080.00816.29
7.3.170.0070.01316.27
7.3.160.0090.00616.28
7.3.120.0090.00614.88
7.3.110.0070.00714.72
7.3.100.0000.01714.44
7.3.90.0040.01114.86
7.3.80.0070.00714.88
7.3.70.0040.01114.64
7.3.60.0030.00914.48
7.3.50.0040.01114.98
7.3.40.0000.01214.70
7.3.30.0100.00614.94
7.3.20.0070.00316.80
7.3.10.0010.01316.67
7.3.00.0050.00816.77
7.2.330.0140.00316.70
7.2.320.0150.00316.74
7.2.310.0100.01316.63
7.2.300.0050.01116.60
7.2.290.0110.00616.71
7.2.250.0150.00615.25
7.2.240.0070.01315.20
7.2.230.0030.01115.03
7.2.220.0060.00614.79
7.2.210.0040.00815.00
7.2.200.0060.01014.96
7.2.190.0060.00914.74
7.2.180.0060.00615.04
7.2.170.0000.00914.82
7.2.130.0060.00316.86
7.2.120.0040.01116.63
7.2.110.0100.00316.90
7.2.100.0060.00616.87
7.2.90.0040.01416.99
7.2.80.0030.00916.88
7.2.70.0030.00916.50
7.2.60.0040.01116.92
7.2.50.0100.00316.67
7.2.40.0000.01116.86
7.2.30.0030.01316.85
7.2.20.0070.00716.61
7.2.10.0070.00716.86
7.2.00.0090.00618.16
7.1.330.0030.00915.97
7.1.320.0000.01015.61
7.1.310.0030.01415.91
7.1.300.0080.00415.76
7.1.290.0040.00715.98
7.1.280.0040.00715.86
7.1.270.0000.01015.52
7.1.260.0060.00615.86
7.1.250.0000.01215.76
7.1.200.0150.01115.46
7.1.100.0000.01718.05
7.1.70.0000.00917.09
7.1.60.0070.01719.46
7.1.50.0090.00316.95
7.1.00.0000.08022.51
7.0.200.0000.00716.63
7.0.140.0070.07022.12
7.0.90.0770.02720.14
7.0.80.0170.03320.00
7.0.70.0070.05019.97
7.0.60.0230.06719.93
7.0.50.0100.08020.41
7.0.40.0070.08319.96
7.0.30.0100.05320.05
7.0.20.0070.05020.17
7.0.10.0170.07020.10
7.0.00.0130.07720.13
5.6.280.0070.07020.86
5.6.240.0030.07720.58
5.6.230.0070.07320.57
5.6.220.0070.04720.57
5.6.210.0030.07320.55
5.6.200.0070.06321.02
5.6.190.0170.07321.00
5.6.180.0070.07721.02
5.6.170.0100.07721.01
5.6.160.0030.08021.09
5.6.150.0070.08320.94
5.6.140.0070.07721.07
5.6.130.0030.05021.07
5.6.120.0030.04021.03
5.6.110.0030.04021.02
5.6.100.0070.06321.15
5.6.90.0100.03720.92
5.6.80.0000.06720.37
5.6.70.0200.03320.46
5.6.60.0070.05320.31
5.6.50.0070.05020.43
5.6.40.0100.06720.45
5.6.30.0000.07020.39
5.6.20.0130.05720.39
5.6.10.0030.04720.36
5.6.00.0170.06720.41
5.5.380.0230.07320.39
5.5.370.0030.04720.37
5.5.360.0170.06720.48
5.5.350.0130.05720.43
5.5.340.0070.04720.86
5.5.330.0070.04720.86
5.5.320.0100.07720.88
5.5.310.0100.07720.86
5.5.300.0070.07720.82
5.5.290.0070.07720.92
5.5.280.0000.04720.86
5.5.270.0100.04320.71
5.5.260.0030.08320.79
5.5.250.0070.03720.72
5.5.240.0100.07320.29
5.5.230.0000.05720.20
5.5.220.0100.07320.21
5.5.210.0100.07020.29
5.5.200.0130.06720.28
5.5.190.0030.08320.27
5.5.180.0100.05319.99
5.5.160.0030.07720.27
5.5.150.0130.06020.10
5.5.140.0130.07720.26
5.5.130.0070.08020.27
5.5.120.0100.04320.07
5.5.110.0100.07720.16
5.5.100.0000.05020.15
5.5.90.0030.08019.97
5.5.80.0070.04319.97
5.5.70.0100.09320.12
5.5.60.0000.05720.08
5.5.50.0170.07020.02
5.5.40.0030.05020.15
5.5.30.0100.04320.05
5.5.20.0200.06320.02
5.5.10.0130.06320.10
5.5.00.0100.07020.03
5.4.450.0070.08019.11
5.4.440.0000.05019.37
5.4.430.0000.04019.43
5.4.420.0000.05019.36
5.4.410.0200.04019.16
5.4.400.0030.04319.13
5.4.390.0030.05018.92
5.4.380.0200.05718.94
5.4.370.0170.06718.96
5.4.360.0000.07719.14
5.4.350.0000.05019.14
5.4.340.0030.04318.79
5.4.320.0030.07319.07
5.4.310.0070.03719.23
5.4.300.0030.07018.95
5.4.290.0030.06718.96
5.4.280.0130.07019.05
5.4.270.0130.06719.04
5.4.260.0130.06719.02
5.4.250.0070.06018.96
5.4.240.0070.06718.97
5.4.230.0100.07319.14
5.4.220.0100.06319.10
5.4.210.0030.08018.80
5.4.200.0100.03319.04
5.4.190.0100.07319.11
5.4.180.0130.03719.02
5.4.170.0130.07019.10
5.4.160.0170.07019.07
5.4.150.0000.04719.04
5.4.140.0070.07016.29
5.4.130.0070.07316.29
5.4.120.0000.07716.33
5.4.110.0100.06316.21
5.4.100.0130.05316.21
5.4.90.0070.04016.26
5.4.80.0070.03716.39
5.4.70.0100.06716.39
5.4.60.0100.04016.38
5.4.50.0070.04716.23
5.4.40.0000.04016.23
5.4.30.0030.07316.31
5.4.20.0030.06016.23
5.4.10.0030.03716.33
5.4.00.0030.06315.77
5.3.290.0070.05714.66
5.3.280.0070.04314.52
5.3.270.0070.08014.42
5.3.260.0000.06714.43
5.3.250.0100.03714.44
5.3.240.0030.08014.55
5.3.230.0030.07714.59
5.3.220.0070.04314.52
5.3.210.0100.07014.43
5.3.200.0070.08014.43
5.3.190.0170.05014.50
5.3.180.0170.06314.51
5.3.170.0000.04014.47
5.3.160.0030.03714.40
5.3.150.0070.06314.55
5.3.140.0070.03714.53
5.3.130.0030.07014.41
5.3.120.0070.06714.50
5.3.110.0030.07714.54
5.3.100.0100.04314.01
5.3.90.0070.03313.87
5.3.80.0000.04014.01
5.3.70.0030.08013.79
5.3.60.0030.07013.96
5.3.50.0030.07313.93
5.3.40.0030.05313.90
5.3.30.0100.07013.89
5.3.20.0100.04013.63
5.3.10.0070.04313.63
5.3.00.0100.06313.50
5.2.170.0030.04011.06
5.2.160.0030.04311.09
5.2.150.0030.06311.00
5.2.140.0070.06011.13
5.2.130.0000.06311.06
5.2.120.0000.04311.02
5.2.110.0030.06311.02
5.2.100.0070.06310.92
5.2.90.0130.05011.05
5.2.80.0100.03311.14
5.2.70.0100.03010.95
5.2.60.0100.05010.97
5.2.50.0030.06311.04
5.2.40.0100.06010.94
5.2.30.0100.05310.93
5.2.20.0130.04310.95
5.2.10.0000.04310.88
5.2.00.0030.03010.76
5.1.60.0000.02710.58
5.1.50.0070.02310.58
5.1.40.0100.04310.58
5.1.30.0000.02310.58
5.1.20.0000.03710.58
5.1.10.0030.02310.58
5.1.00.0030.05710.58
5.0.50.0070.01710.58
5.0.40.0000.02310.58
5.0.30.0000.03010.58
5.0.20.0030.01710.58
5.0.10.0070.01310.58
5.0.00.0070.02710.58
4.4.90.0000.03710.58
4.4.80.0070.02710.58
4.4.70.0030.03310.58
4.4.60.0000.02310.58
4.4.50.0030.02710.58
4.4.40.0000.02310.58
4.4.30.0030.02310.58
4.4.20.0000.01710.58
4.4.10.0000.01310.58
4.4.00.0000.02710.58
4.3.110.0030.01310.58
4.3.100.0000.01710.58
4.3.90.0000.01710.58
4.3.80.0000.02310.58
4.3.70.0030.02010.58
4.3.60.0000.02010.58
4.3.50.0000.02010.58
4.3.40.0030.02310.58
4.3.30.0000.01710.58
4.3.20.0000.01710.58
4.3.10.0000.01710.58
4.3.00.0000.01710.58

preferences:
94.57 ms | 401 KiB | 5 Q