3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TH { public function entities(&$val) { $val = htmlentities($val); } } $th = new TH($val); $arr = array('f' => '<pizza>', 'g' => '<onions>'); array_walk($arr, array($th, 'entities')); var_dump($arr);

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.40.0120.00318.76
8.3.30.0080.00818.54
8.3.20.0040.00418.48
8.3.10.0060.00320.53
8.3.00.0110.00019.38
8.2.170.0040.01122.96
8.2.160.0090.00618.95
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0070.00021.05
8.2.110.0000.00920.86
8.2.100.0080.00317.84
8.2.90.0030.00619.47
8.2.80.0040.00419.29
8.2.70.0060.00317.62
8.2.60.0030.00518.04
8.2.50.0060.00318.07
8.2.40.0080.00018.16
8.2.30.0080.00017.89
8.2.20.0040.00419.40
8.2.10.0060.00317.67
8.2.00.0040.00417.71
8.1.270.0030.00623.99
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0060.00322.39
8.1.230.0040.00820.91
8.1.220.0050.00317.74
8.1.210.0000.00918.89
8.1.200.0040.00817.23
8.1.190.0040.00417.66
8.1.180.0000.00818.10
8.1.170.0030.00618.91
8.1.160.0070.00018.77
8.1.150.0030.00618.71
8.1.140.0040.00417.30
8.1.130.0070.00017.77
8.1.120.0030.00717.45
8.1.110.0030.00517.38
8.1.100.0040.00417.46
8.1.90.0030.00417.46
8.1.80.0000.00817.35
8.1.70.0000.00817.41
8.1.60.0000.00917.60
8.1.50.0030.00517.33
8.1.40.0050.00217.55
8.1.30.0040.00417.63
8.1.20.0040.00417.66
8.1.10.0000.00817.57
8.1.00.0030.00617.49
8.0.300.0050.00219.94
8.0.290.0070.00016.88
8.0.280.0030.00318.32
8.0.270.0000.00717.24
8.0.260.0000.00716.75
8.0.250.0000.00716.88
8.0.240.0030.00516.98
8.0.230.0000.00717.00
8.0.220.0040.00416.92
8.0.210.0000.00716.93
8.0.200.0030.00317.04
8.0.190.0000.00816.88
8.0.180.0000.00717.00
8.0.170.0030.00616.77
8.0.160.0070.00016.80
8.0.150.0060.00316.92
8.0.140.0030.00716.80
8.0.130.0030.00313.41
8.0.120.0080.00016.87
8.0.110.0040.00416.82
8.0.100.0040.00416.98
8.0.90.0070.00016.94
8.0.80.0120.00316.93
8.0.70.0040.00416.91
8.0.60.0000.00716.79
8.0.50.0000.00916.92
8.0.30.0070.01117.11
8.0.20.0140.00917.14
8.0.10.0000.00817.04
8.0.00.0120.01216.73
7.4.330.0000.00512.98
7.4.320.0000.00716.51
7.4.300.0000.00816.55
7.4.290.0030.00316.44
7.4.280.0000.01116.49
7.4.270.0040.00416.59
7.4.260.0000.00513.18
7.4.250.0080.00016.62
7.4.240.0000.00716.51
7.4.230.0030.00316.67
7.4.220.0120.00616.37
7.4.210.0060.02616.41
7.4.200.0000.00716.64
7.4.190.0030.00316.65
7.4.160.0110.00516.36
7.4.150.0210.00416.46
7.4.140.0130.01016.42
7.4.130.0280.03116.47
7.4.120.0120.00416.36
7.4.110.0120.00616.64
7.4.100.0090.01216.45
7.4.90.0060.01216.55
7.4.80.0130.01019.39
7.4.70.0070.01116.56
7.4.60.0070.01016.55
7.4.50.0060.00316.35
7.4.40.0060.00916.65
7.4.30.0110.00616.44
7.4.00.0030.01315.11
7.3.330.0060.00013.28
7.3.320.0040.00413.33
7.3.310.0040.00316.17
7.3.300.0000.00716.30
7.3.290.0020.01216.34
7.3.280.0130.00816.30
7.3.270.0100.00716.43
7.3.260.0160.00016.43
7.3.250.0110.01116.47
7.3.240.0110.01016.28
7.3.230.0090.00916.52
7.3.210.0130.01016.31
7.3.200.0100.01316.39
7.3.190.0080.00816.27
7.3.180.0120.00616.43
7.3.170.0140.00316.41
7.3.160.0110.00616.30
7.3.120.0120.00315.03
7.3.10.0040.01216.58
7.3.00.0100.00716.68
7.2.330.0110.00616.48
7.2.320.0080.00816.30
7.2.310.0070.01016.75
7.2.300.0210.00716.74
7.2.290.0130.00416.34
7.2.130.0100.00316.91
7.2.120.0210.00016.98
7.2.110.0110.00416.95
7.2.100.0060.00916.93
7.2.90.0050.00516.93
7.2.80.0090.00617.00
7.2.70.0150.00716.51
7.2.60.0060.00616.82
7.2.50.0030.01116.70
7.2.40.0130.00616.64
7.2.30.0100.00616.68
7.2.20.0080.00816.73
7.2.10.0130.00716.86
7.2.00.0080.00618.09
7.1.250.0060.00315.86
7.1.200.0060.00915.63
7.1.100.0060.00618.34
7.1.70.0060.00317.34
7.1.60.0100.01419.30
7.1.50.0040.01516.99
7.1.00.0000.06722.43
7.0.200.0040.00416.70
7.0.140.0070.07021.97
7.0.120.0070.06722.07
7.0.60.0100.08019.75
7.0.50.0030.04317.87
7.0.40.0100.04320.24
7.0.30.0300.07720.23
7.0.20.0270.06720.07
7.0.10.0070.08720.23
7.0.00.0130.06720.23
5.6.280.0000.07721.07
5.6.210.0170.06320.73
5.6.200.0100.05018.12
5.6.190.0030.08720.46
5.6.180.0430.06720.58
5.6.170.0200.04320.55
5.6.160.0000.06020.50
5.6.150.0030.08318.25
5.6.140.0070.06318.28
5.6.130.0070.04718.24
5.6.120.0030.06020.98
5.6.110.0100.05320.88
5.6.100.0170.08020.98
5.6.90.0100.05721.02
5.6.80.0070.08720.40
5.5.350.0170.07320.41
5.5.340.0030.08018.03
5.5.330.0030.09020.42
5.5.320.0300.07320.35
5.5.310.0370.05020.36
5.5.300.0130.07317.98
5.5.290.0130.03017.91
5.5.280.0200.05020.85
5.5.270.0070.08320.76
5.5.260.0070.08020.76
5.5.250.0100.06320.70
5.5.240.0070.07720.19
5.4.450.0030.08019.48
5.4.440.0170.07019.40
5.4.430.0070.04319.51
5.4.420.0000.08319.25
5.4.410.0130.07319.32
5.4.400.0030.07319.14
5.4.390.0070.07319.12
5.4.380.0030.05718.88
5.4.370.0070.07319.08
5.4.360.0170.07319.12
5.4.350.0130.07319.20
5.4.340.0030.07019.14
5.4.320.0100.04018.87
5.4.310.0100.07018.88
5.4.300.0130.05319.00
5.4.290.0100.05718.87
5.4.280.0100.07718.85
5.4.270.0070.05319.11
5.4.260.0070.03719.07
5.4.250.0000.05018.93
5.4.240.0100.07718.85
5.4.230.0100.05319.23
5.4.220.0070.03719.17
5.4.210.0030.04019.24
5.4.200.0000.05318.84
5.4.190.0030.04319.07
5.4.180.0100.07318.84
5.4.170.0100.07319.11
5.4.160.0100.05319.22
5.4.150.0000.04719.03
5.4.140.0030.04716.38
5.4.130.0200.05316.34
5.4.120.0000.06716.39
5.4.110.0000.04316.43
5.4.100.0030.04716.29
5.4.90.0070.04716.43
5.4.80.0030.03316.39
5.4.70.0030.04016.35
5.4.60.0070.03316.43
5.4.50.0000.03716.36
5.4.40.0030.03716.39
5.4.30.0030.04016.46
5.4.20.0030.03716.26
5.4.10.0070.03016.41
5.4.00.0030.03315.94
5.3.290.0130.07014.72
5.3.280.0070.04714.48
5.3.270.0070.07714.60
5.3.260.0130.07014.75
5.3.250.0070.05014.60
5.3.240.0070.07014.63
5.3.230.0070.07714.65
5.3.220.0030.05314.61
5.3.210.0000.07714.62
5.3.200.0100.05714.62
5.3.190.0000.04014.55
5.3.180.0000.04014.61
5.3.170.0000.04014.61
5.3.160.0030.03714.55
5.3.150.0030.03714.58
5.3.140.0100.03714.61
5.3.130.0000.04014.54
5.3.120.0070.03314.57
5.3.110.0030.03714.57
5.3.100.0000.04013.95
5.3.90.0000.03714.02
5.3.80.0000.05014.05
5.3.70.0030.03314.07
5.3.60.0030.03314.04
5.3.50.0000.03713.95
5.3.40.0030.03714.02
5.3.30.0030.03313.91
5.3.20.0030.03313.75
5.3.10.0000.04013.80
5.3.00.0070.05013.61
5.2.170.0100.02011.31
5.2.160.0030.02711.33
5.2.150.0000.03011.12
5.2.140.0000.03011.09
5.2.130.0000.03311.14
5.2.120.0000.03011.12
5.2.110.0070.03011.10
5.2.100.0000.03011.20
5.2.90.0030.02711.18
5.2.80.0030.04311.10
5.2.70.0030.02711.10
5.2.60.0070.02311.06
5.2.50.0100.02010.98
5.2.40.0070.03011.01
5.2.30.0030.03311.04
5.2.20.0000.03011.10
5.2.10.0070.02310.86
5.2.00.0030.02710.72
5.1.60.0000.0239.98
5.1.50.0000.02710.04
5.1.40.0030.02310.01
5.1.30.0070.02010.48
5.1.20.0030.02710.36
5.1.10.0030.02310.11
5.1.00.0070.02010.21
5.0.50.0030.0178.56
5.0.40.0000.0208.50
5.0.30.0000.0378.36
5.0.20.0070.0208.11
5.0.10.0030.0378.22
5.0.00.0000.0538.11
4.4.90.0030.0137.94
4.4.80.0000.0177.94
4.4.70.0000.0177.94
4.4.60.0070.0107.94
4.4.50.0000.0207.94
4.4.40.0000.0237.94
4.4.30.0000.0177.94
4.4.20.0000.0177.94
4.4.10.0070.0107.94
4.4.00.0000.0237.94
4.3.110.0000.0177.94
4.3.100.0000.0207.94
4.3.90.0000.0207.94
4.3.80.0030.0377.94
4.3.70.0000.0207.94
4.3.60.0000.0377.94
4.3.50.0030.0237.94
4.3.40.0000.0337.94
4.3.30.0000.0177.94
4.3.20.0000.0377.94
4.3.10.0000.0177.94
4.3.00.0030.0207.94

preferences:
39.22 ms | 400 KiB | 5 Q