3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sweet = ['a' => 'apple ', 'b' => ' "banana" ']; $array = ['sweet' => $sweet, 'test' => " <a href='test'>Test</a>"]; array_walk_recursive($array, function(&$value) { $value = htmlspecialchars(trim($value)); } ); var_export($array);

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.4.130.0130.00717.50
8.4.120.0040.00620.72
8.4.110.0070.01018.81
8.4.100.0080.01117.64
8.4.90.0110.00720.39
8.4.80.0080.01218.65
8.4.70.0060.00418.98
8.4.60.0120.00818.73
8.4.50.0130.00818.53
8.4.40.0000.01219.49
8.4.30.0060.00618.93
8.4.20.0180.00317.59
8.4.10.0040.00417.59
8.3.260.0110.00816.74
8.3.250.0130.00718.60
8.3.240.0060.00316.53
8.3.230.0070.00216.63
8.3.220.0130.00619.10
8.3.210.0120.00716.78
8.3.200.0050.00416.59
8.3.190.0030.00819.26
8.3.180.0090.00918.90
8.3.170.0110.00718.90
8.3.160.0100.01018.48
8.3.150.0120.00918.87
8.3.140.0060.01217.36
8.3.130.0040.00418.50
8.3.120.0000.00820.60
8.3.110.0030.00516.53
8.3.100.0060.00318.57
8.3.90.0000.00726.77
8.3.80.0040.00817.97
8.3.70.0140.01116.75
8.3.60.0110.00616.50
8.3.50.0080.00624.54
8.3.40.0120.00618.71
8.3.30.0120.00318.48
8.3.20.0080.00020.77
8.3.10.0070.00020.21
8.3.00.0050.00322.40
8.2.290.0090.00816.26
8.2.280.0110.00918.42
8.2.270.0130.00716.50
8.2.260.0070.01117.02
8.2.250.0080.00018.20
8.2.240.0100.01016.46
8.2.230.0050.00520.94
8.2.220.0040.00424.06
8.2.210.0160.00326.77
8.2.200.0040.00418.41
8.2.190.0100.00716.58
8.2.180.0110.00418.41
8.2.170.0040.01122.96
8.2.160.0030.01022.03
8.2.150.0070.00024.18
8.2.140.0000.00724.66
8.2.130.0050.00326.16
8.2.120.0090.00920.97
8.2.110.0040.00421.13
8.2.100.0040.00817.91
8.2.90.0080.00517.80
8.2.80.0080.00018.05
8.2.70.0030.00518.16
8.2.60.0030.00618.22
8.2.50.0030.00618.10
8.2.40.0030.00619.32
8.2.30.0080.00019.30
8.2.20.0040.00418.11
8.2.10.0000.00719.00
8.2.00.0040.00419.18
8.1.330.0130.00716.30
8.1.320.0170.00218.02
8.1.310.0100.00716.83
8.1.300.0070.00017.86
8.1.290.0030.00618.88
8.1.280.0120.00325.92
8.1.270.0040.00424.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00622.14
8.1.230.0060.00622.67
8.1.220.0060.00317.74
8.1.210.0060.00318.91
8.1.200.0000.00917.35
8.1.190.0000.00817.25
8.1.180.0000.00718.10
8.1.170.0040.00418.64
8.1.160.0000.00718.95
8.1.150.0040.00418.80
8.1.140.0040.00422.01
8.1.130.0000.00720.16
8.1.120.0000.00817.47
8.1.110.0000.00717.36
8.1.100.0060.00317.32
8.1.90.0040.00417.48
8.1.80.0050.00317.47
8.1.70.0000.00717.51
8.1.60.0030.00517.57
8.1.50.0000.00817.55
8.1.40.0000.00817.53
8.1.30.0090.00017.61
8.1.20.0000.00717.54
8.1.10.0040.00417.54
8.1.00.0040.00417.46
8.0.300.0040.00420.09
8.0.290.0090.00016.63
8.0.280.0000.00718.38
8.0.270.0040.00417.07
8.0.260.0040.00420.02
8.0.250.0030.00316.80
8.0.240.0070.00016.78
8.0.230.0070.00016.89
8.0.220.0030.00316.82
8.0.210.0030.00316.77
8.0.200.0000.00816.97
8.0.190.0040.00416.95
8.0.180.0070.00016.95
8.0.170.0000.00916.89
8.0.160.0040.00416.90
8.0.150.0000.00716.80
8.0.140.0050.00216.90
8.0.130.0000.00513.28
8.0.120.0000.00716.83
8.0.110.0040.00416.91
8.0.100.0050.00316.71
8.0.90.0060.00316.75
8.0.80.0060.01016.79
8.0.70.0040.00416.89
8.0.60.0050.00216.71
8.0.50.0030.00516.87
8.0.30.0070.01817.27
8.0.20.0100.01217.13
8.0.10.0080.00017.06
8.0.00.0040.01416.59
7.4.330.0030.00315.55
7.4.320.0000.00716.54
7.4.300.0000.00716.55
7.4.290.0000.00816.61
7.4.280.0060.00316.48
7.4.270.0000.00716.54
7.4.260.0000.00513.25
7.4.250.0070.00016.42
7.4.240.0060.00216.62
7.4.230.0070.00016.48
7.4.220.0040.00416.46
7.4.210.0090.00716.57
7.4.200.0050.00316.59
7.4.130.0050.01316.58
7.4.120.0110.00716.39
7.4.110.0060.01016.43
7.4.100.0070.01516.38
7.4.90.0090.00916.45
7.4.80.0130.00319.39
7.4.70.0030.01216.55
7.4.60.0130.00716.41
7.4.50.0040.01516.21
7.4.40.0100.01416.30
7.4.00.0140.00014.55
7.3.330.0040.00416.34
7.3.320.0050.00013.35
7.3.310.0000.00716.27
7.3.300.0000.00616.34
7.3.290.0130.00516.33
7.3.280.0100.01016.29
7.3.260.0120.01216.42
7.3.240.0110.00616.44
7.3.230.0040.01216.35
7.3.210.0080.00816.41
7.3.200.0140.00316.25
7.3.190.0160.01016.34
7.3.180.0040.01816.32
7.3.170.0100.01316.19
7.3.160.0120.00816.21
7.3.120.0030.01114.66
7.3.110.0140.00314.87
7.3.100.0100.00314.77
7.3.90.0120.00414.48
7.3.80.0060.00614.46
7.3.70.0100.00314.73
7.3.60.0070.00714.56
7.3.50.0070.00714.85
7.3.40.0060.00614.88
7.3.30.0020.01014.68
7.3.20.0070.00614.73
7.3.10.0100.00314.69
7.3.00.0090.00614.36
7.2.330.0100.00916.67
7.2.320.0130.00316.66
7.2.310.0080.00816.66
7.2.300.0100.01016.62
7.2.290.0090.00916.52
7.2.250.0060.00914.98
7.2.240.0090.00914.79
7.2.230.0060.00815.19
7.2.220.0070.01114.93
7.2.210.0080.00514.88
7.2.200.0060.00814.81
7.2.190.0030.01014.76
7.2.180.0090.00514.98
7.2.170.0030.01114.78
7.1.330.0090.00913.74
7.1.320.0100.00714.05
7.1.310.0090.00413.86
7.1.300.0080.00613.59
7.1.290.0100.00313.77
7.1.280.0000.01313.95
7.1.270.0060.00613.90
7.1.260.0050.00813.86

preferences:
34.79 ms | 403 KiB | 5 Q