3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('w','z','u','o','ul.'); $titleOld = 'Testing w it\'s ul. here'; $words = explode(' ', $titleOld); $titleNew = rtrim(join('', array_map(fn($word) => $word . (in_array($word, $array) ? "&nbsp;" : ' '), $words))); echo $titleNew; // "Testing w&nbsp;it's ul.&nbsp;here"

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.0120.00818.62
8.4.120.0110.00917.71
8.4.110.0130.00620.68
8.4.100.0050.00317.84
8.4.90.0070.00320.28
8.4.80.0060.00219.02
8.4.70.0110.01019.09
8.4.60.0050.00418.71
8.4.50.0120.01017.83
8.4.40.0030.00619.51
8.4.30.0130.00620.59
8.4.20.0170.00320.48
8.4.10.0000.01019.67
8.3.260.0120.00616.66
8.3.250.0100.00616.63
8.3.240.0130.00716.35
8.3.230.0110.00816.56
8.3.220.0120.00718.90
8.3.210.0110.00816.52
8.3.200.0070.00416.44
8.3.190.0100.00916.55
8.3.180.0120.00918.18
8.3.170.0060.01016.53
8.3.160.0060.01216.66
8.3.150.0090.00917.17
8.3.140.0040.00417.36
8.3.130.0080.00018.29
8.3.120.0000.01418.88
8.3.110.0140.00020.94
8.3.100.0060.00324.06
8.3.90.0080.00026.77
8.3.80.0070.00416.50
8.3.70.0180.00016.58
8.3.60.0070.01416.50
8.3.50.0060.00918.21
8.3.40.0080.00618.55
8.3.30.0150.00418.71
8.3.20.0030.00524.18
8.3.10.0050.00324.66
8.3.00.0000.00726.16
8.2.290.0100.00916.48
8.2.280.0080.00618.27
8.2.270.0120.00616.55
8.2.260.0100.00718.61
8.2.250.0050.00316.76
8.2.240.0140.00417.09
8.2.230.0060.00322.58
8.2.220.0090.00037.54
8.2.210.0110.00726.77
8.2.200.0040.00416.63
8.2.190.0180.00416.63
8.2.180.0100.01025.92
8.2.170.0190.00018.69
8.2.160.0040.01522.96
8.2.150.0050.00225.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00026.35
8.2.110.0030.00620.41
8.2.100.0120.00417.66
8.2.90.0050.00317.75
8.2.80.0060.00318.77
8.2.70.0050.00517.63
8.2.60.0050.00217.93
8.2.50.0030.00618.05
8.2.40.0000.00818.22
8.2.30.0030.00617.94
8.2.20.0070.00018.07
8.2.10.0070.00419.31
8.2.00.0000.00719.19
8.1.330.0140.00516.16
8.1.320.0070.00117.88
8.1.310.0090.00616.58
8.1.300.0080.00417.39
8.1.290.0040.00430.84
8.1.280.0140.00725.92
8.1.270.0050.00223.99
8.1.260.0000.00728.09
8.1.250.0030.00628.09
8.1.240.0100.00021.88
8.1.230.0070.00417.76
8.1.220.0030.00517.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0040.00417.36
8.1.180.0110.00418.10
8.1.170.0040.00418.64
8.1.160.0040.00418.94
8.1.150.0000.00718.80
8.1.140.0000.00818.93
8.1.130.0000.00720.20
8.1.120.0000.00717.47
8.1.110.0030.00517.37
8.1.100.0030.00517.44
8.1.90.0030.00517.51
8.1.80.0030.00617.51
8.1.70.0040.00417.35
8.1.60.0000.00817.62
8.1.50.0030.00517.51
8.1.40.0040.00417.52
8.1.30.0090.00317.70
8.1.20.0040.00417.68
8.1.10.0050.00317.50
8.1.00.0030.00517.45
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.45
8.0.270.0000.00718.06
8.0.260.0050.00518.45
8.0.250.0060.00016.99
8.0.240.0030.00516.82
8.0.230.0000.00716.97
8.0.220.0070.00016.72
8.0.210.0000.00616.84
8.0.200.0000.00716.94
8.0.190.0000.00717.01
8.0.180.0070.00016.82
8.0.170.0000.00816.81
8.0.160.0030.00616.89
8.0.150.0000.00716.90
8.0.140.0030.00516.73
8.0.130.0030.00313.34
8.0.120.0040.00416.89
8.0.110.0040.00416.75
8.0.100.0070.00016.83
8.0.90.0000.00816.80
8.0.80.0050.01116.89
8.0.70.0080.00016.80
8.0.60.0040.00416.77
8.0.50.0040.00416.95
8.0.30.0050.01516.82
8.0.20.0090.00616.88
8.0.10.0080.00816.99
8.0.00.0140.00317.04
7.4.330.0020.00215.55
7.4.320.0030.00316.40
7.4.300.0030.00716.49
7.4.290.0000.00816.40
7.4.280.0050.00216.67
7.4.270.0000.00716.55
7.4.260.0000.00613.29
7.4.250.0000.00716.45
7.4.240.0040.00416.66
7.4.230.0000.00616.49
7.4.220.0030.00316.51
7.4.210.0110.00616.63
7.4.200.0080.00016.50
7.4.160.0060.01416.50
7.4.150.0120.00316.67
7.4.140.0100.01316.37
7.4.130.0060.00916.50
7.4.120.0070.01416.38
7.4.110.0080.01416.49
7.4.100.0040.01116.53
7.4.90.0130.00616.48
7.4.80.0120.00916.40
7.4.70.0170.00316.48
7.4.60.0090.00616.53
7.4.50.0060.01916.28
7.4.40.0080.01516.36
7.4.30.0100.01316.54
7.4.20.0100.01616.56
7.4.10.0120.01216.63
7.4.00.0130.00216.39
7.3.330.0030.00316.17
7.3.320.0000.00513.21
7.3.310.0000.00716.23
7.3.300.0030.00316.03
7.3.290.0070.01016.17
7.3.270.0060.00916.18
7.3.260.0040.01116.17
7.3.250.0100.01016.21
7.3.240.0260.00716.14
7.3.230.0140.00016.16
7.3.220.0080.01216.13
7.3.210.0070.01316.10
7.3.200.0130.00616.12
7.3.190.0080.00816.08
7.3.180.0000.01616.27
7.3.170.0100.01316.08
7.3.160.0140.00316.14
7.3.150.0110.01416.04
7.3.140.0120.00916.01
7.3.130.0070.01116.10
7.3.120.0110.01216.13
7.3.110.0110.00816.06
7.3.100.0040.01215.95
7.3.90.0080.00816.35
7.3.80.0140.00616.13
7.3.70.0060.00916.09
7.3.60.0160.00016.20
7.3.50.0110.00616.15
7.3.40.0110.00416.18
7.3.30.0080.01216.16
7.3.20.0080.01316.20
7.3.10.0130.00616.16
7.3.00.0070.00716.16

preferences:
128.07 ms | 403 KiB | 5 Q