3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'hello', 'leetcode', 'atwood' ]; foreach ($strings as &$string) { $count = preg_match_all('~[aeiou]~', $string, $m, PREG_OFFSET_CAPTURE); for ($i = 1; $i <= $count; ++$i) { $string[$m[0][$count - $i][1]] = $m[0][$i - 1][0]; } } var_export($strings);

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.5.00.0110.01020.28
8.4.150.0030.00014.05
8.4.140.0150.00617.96
8.4.130.0150.00617.86
8.4.120.0120.00920.72
8.4.110.0090.01122.52
8.4.100.0100.00717.85
8.4.90.0120.00818.59
8.4.80.0120.00717.96
8.4.70.0080.00717.93
8.4.60.0050.00518.91
8.4.50.0140.00719.58
8.4.40.0070.00417.77
8.4.30.0070.00320.54
8.4.20.0140.00719.68
8.4.10.0030.00619.73
8.3.280.0100.01118.70
8.3.270.0130.00616.71
8.3.260.0040.00516.66
8.3.250.0120.00719.11
8.3.240.0080.00916.88
8.3.230.0090.01016.75
8.3.220.0130.00617.13
8.3.210.0110.00716.70
8.3.200.0050.00316.90
8.3.190.0080.01017.11
8.3.180.0050.00416.68
8.3.170.0000.00818.88
8.3.160.0060.01218.61
8.3.150.0160.00418.74
8.3.140.0070.00716.59
8.3.130.0090.00018.53
8.3.120.0090.00018.95
8.3.110.0080.00016.54
8.3.100.0090.00016.55
8.3.90.0030.00826.77
8.3.80.0060.00320.44
8.3.70.0090.00916.63
8.3.60.0190.00016.75
8.3.50.0150.00018.14
8.3.40.0120.00420.18
8.3.30.0000.01519.00
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0110.00620.28
8.2.280.0140.01018.73
8.2.270.0070.01117.17
8.2.260.0040.00416.84
8.2.250.0110.00717.01
8.2.240.0090.00018.72
8.2.230.0000.00820.94
8.2.220.0040.00424.06
8.2.210.0030.00626.77
8.2.200.0060.00316.88
8.2.190.0100.00716.63
8.2.180.0100.00725.92
8.2.170.0090.00619.20
8.2.160.0130.00322.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0090.00026.16
8.2.120.0060.00326.16
8.2.110.0060.00322.21
8.2.100.0070.00418.09
8.2.90.0050.00318.09
8.2.80.0040.00419.33
8.2.70.0090.00017.88
8.2.60.0040.00417.63
8.2.50.0040.00417.98
8.2.40.0040.00417.97
8.2.30.0000.00718.03
8.2.20.0040.00420.34
8.2.10.0070.00018.00
8.2.00.0040.00419.40
8.1.330.0140.00622.23
8.1.320.0100.01016.40
8.1.310.0030.00616.54
8.1.300.0050.00518.55
8.1.290.0090.00030.84
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00920.82
8.1.230.0070.00420.99
8.1.220.0030.00517.77
8.1.210.0080.00018.78
8.1.200.0060.00317.48
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0000.00817.65
8.1.160.0000.00718.91
8.1.150.0040.00418.66
8.1.140.0070.00017.64
8.1.130.0000.00718.83
8.1.120.0030.00417.51
8.1.110.0000.00817.63
8.1.100.0000.00717.51
8.1.90.0040.00417.63
8.1.80.0040.00417.49
8.1.70.0000.00717.59
8.1.60.0040.00417.74
8.1.50.0000.00817.56
8.1.40.0000.00817.55
8.1.30.0080.00317.78
8.1.20.0000.00717.75
8.1.10.0200.00317.67
8.1.00.0230.00017.63
8.0.300.0000.00820.09
8.0.290.0040.00416.75
8.0.280.0030.00618.47
8.0.270.0070.00016.96
8.0.260.0000.00718.46
8.0.250.0000.00717.00
8.0.240.0080.00017.08
8.0.230.0000.00717.07
8.0.220.0040.00416.97
8.0.210.0040.00417.03
8.0.200.0040.00417.10
8.0.190.0000.00717.10
8.0.180.0040.00417.09
8.0.170.0030.00517.05
8.0.160.0040.00417.07
8.0.150.0040.00417.02
8.0.140.0140.00416.84
8.0.130.0130.00616.93
8.0.120.0120.00316.99
8.0.110.0120.00617.04
8.0.100.0190.00016.92
8.0.90.0160.00317.00
8.0.80.0090.00316.94
8.0.70.0080.00516.88
8.0.60.0140.00416.88
8.0.50.0110.00816.96
8.0.30.0110.00816.93
8.0.20.0100.01017.07
8.0.10.0110.00817.18
8.0.00.0060.00617.11
7.4.330.0030.00315.55
7.4.320.0060.00016.64
7.4.300.0090.00016.68
7.4.290.0040.00416.66
7.4.280.0080.00016.80
7.4.270.0170.00216.64
7.4.260.0110.01216.69
7.4.250.0130.00916.57
7.4.240.0140.00716.80
7.4.230.0160.00416.62
7.4.220.0150.00316.72
7.4.210.0130.00516.81
7.4.200.0110.00716.73
7.4.190.0090.00916.86
7.4.180.0130.00416.66
7.4.160.0120.00416.71
7.4.150.0120.00816.78
7.4.140.0130.00516.56
7.4.130.0190.00016.70
7.4.120.0220.00016.76
7.4.110.0150.00216.71
7.4.100.0170.00216.73
7.4.90.0110.00816.71
7.4.80.0170.00316.61
7.4.70.0150.00316.68
7.4.60.0170.00316.66
7.4.50.0170.00016.42
7.4.40.0140.00416.67
7.4.30.0160.00416.68
7.4.20.0140.00516.69
7.4.10.0110.00816.53
7.4.00.0200.00016.51
7.3.330.0130.00716.34
7.3.320.0190.00016.56
7.3.310.0150.00016.39
7.3.300.0090.00616.29
7.3.290.0080.00916.26
7.3.280.0160.00416.55
7.3.270.0110.00316.43
7.3.260.0130.00016.28
7.3.250.0060.00616.37
7.3.240.0130.00016.50
7.3.230.0030.01016.43
7.3.220.0050.00316.22
7.3.210.0060.00216.23
7.3.200.0110.00316.31
7.3.190.0130.00016.32
7.3.180.0040.00816.26
7.3.170.0090.00316.36
7.3.160.0070.00716.36
7.3.150.0150.00316.37
7.3.140.0170.00216.39
7.3.130.0150.00516.39

preferences:
142.54 ms | 403 KiB | 5 Q