3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matches = []; $string = "#HelloWorld -> helloworld, #Hello_W0rld -> hello_w0rld, #Hello(World -> hello,"; preg_replace_callback("/#([a-z_0-9]+)/i", function($res) use(&$matches) { $matches[] = strtolower($res[1]); }, $string); var_dump($matches); $matches2 = []; $string2 = "@HelloWorld -> helloworld, @Hello_W0rl.d -> hello_w0rl,"; preg_replace_callback("/@([a-z_0-9]+)/i", function($res) use(&$matches2) { $matches2[] = strtolower($res[1]); }, $string2); var_dump($matches2);

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.130.0050.00316.73
8.3.120.0050.00520.79
8.3.110.0040.00418.67
8.3.100.0080.00016.79
8.3.90.0040.00426.77
8.3.80.0080.00318.16
8.3.70.0070.00718.81
8.3.60.0140.00716.75
8.3.50.0040.00917.61
8.3.40.0120.00318.79
8.3.30.0070.00719.09
8.3.20.0070.00021.73
8.3.10.0030.00523.71
8.3.00.0040.00419.05
8.2.250.0040.00418.48
8.2.240.0040.00417.39
8.2.230.0030.00620.94
8.2.220.0160.00316.48
8.2.210.0130.00726.77
8.2.200.0030.00618.42
8.2.190.0180.00016.63
8.2.180.0070.01118.42
8.2.170.0060.00922.96
8.2.160.0000.01420.55
8.2.150.0060.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00019.26
8.2.120.0040.00426.35
8.2.110.0060.00320.98
8.2.100.0040.00818.28
8.2.90.0040.00417.88
8.2.80.0100.00017.97
8.2.70.0030.00617.75
8.2.60.0030.00517.75
8.2.50.0000.00818.03
8.2.40.0000.00818.05
8.2.30.0040.00419.42
8.2.20.0050.00318.07
8.2.10.0040.00417.84
8.2.00.0000.00718.06
8.1.300.0030.00618.46
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0040.00420.76
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00817.61
8.1.230.0080.00417.70
8.1.220.0040.00417.79
8.1.210.0030.00618.77
8.1.200.0060.00317.48
8.1.190.0050.00317.47
8.1.180.0050.00318.10
8.1.170.0030.00617.80
8.1.160.0000.00718.84
8.1.150.0040.00418.83
8.1.140.0040.00417.74
8.1.130.0070.00020.18
8.1.120.0000.00717.53
8.1.110.0000.00817.53
8.1.100.0000.00717.64
8.1.90.0000.00717.59
8.1.80.0000.01017.52
8.1.70.0000.00717.69
8.1.60.0030.00617.76
8.1.50.0040.00417.70
8.1.40.0020.00517.59
8.1.30.0000.00817.77
8.1.20.0080.00017.77
8.1.10.0040.00417.77
8.1.00.0080.00417.61
8.0.300.0040.00418.77
8.0.290.0060.00316.88
8.0.280.0030.00318.47
8.0.270.0030.00317.29
8.0.260.0050.00316.90
8.0.250.0000.00717.02
8.0.240.0050.00317.12
8.0.230.0070.00017.09
8.0.220.0000.00717.01
8.0.210.0000.00717.07
8.0.200.0000.00717.00
8.0.190.0040.00417.12
8.0.180.0040.00416.97
8.0.170.0000.00817.12
8.0.160.0070.00017.07
8.0.150.0070.00016.96
8.0.140.0040.00417.04
8.0.130.0060.00013.44
8.0.120.0000.00816.90
8.0.110.0040.00417.12
8.0.100.0040.00417.11
8.0.90.0070.00016.92
8.0.80.0060.01017.10
8.0.70.0050.00217.06
8.0.60.0050.00317.00
8.0.50.0000.00716.94
8.0.30.0080.01017.17
8.0.20.0080.01217.40
8.0.10.0000.00817.08
8.0.00.0050.01316.95
7.4.330.0050.00015.55
7.4.320.0000.00716.84
7.4.300.0000.00616.72
7.4.290.0030.00316.82
7.4.280.0070.00016.64
7.4.270.0000.00716.81
7.4.260.0000.00816.85
7.4.250.0000.00816.77
7.4.240.0000.00816.82
7.4.230.0000.00716.72
7.4.220.0040.00416.93
7.4.210.0060.00816.74
7.4.200.0070.00016.64
7.4.160.0140.00516.86
7.4.140.0120.00717.86
7.4.130.0180.00316.80
7.4.120.0100.00916.69
7.4.110.0060.01216.56
7.4.100.0000.01916.73
7.4.90.0100.01016.70
7.4.80.0110.01419.39
7.4.70.0110.01216.69
7.4.60.0140.00416.81
7.4.50.0070.01116.49
7.4.40.0130.01016.61
7.4.00.0080.00815.19
7.3.330.0000.00613.46
7.3.320.0030.00313.40
7.3.310.0030.00316.36
7.3.300.0070.00016.55
7.3.290.0000.00716.43
7.3.280.0090.01216.48
7.3.260.0100.00916.60
7.3.240.0090.01016.63
7.3.230.0070.01516.60
7.3.210.0130.00416.49
7.3.200.0100.00716.50
7.3.190.0000.01716.76
7.3.180.0040.01316.73
7.3.170.0100.01016.42
7.3.160.0090.00616.75
7.2.330.0170.00716.91
7.2.320.0070.01016.81
7.2.310.0110.00516.63
7.2.300.0140.00316.69
7.2.290.0120.00716.77
7.2.60.0060.01016.98
7.2.30.0210.01418.31
7.2.20.0150.01418.14
7.2.10.0200.01818.06
7.2.00.0170.01518.43
7.1.200.0070.00715.97
7.1.150.0180.00917.14
7.1.140.0170.01416.96
7.1.130.0230.01217.27
7.1.120.0220.01017.12
7.1.110.0190.01316.07
7.1.100.0150.01616.41
7.1.90.0680.01216.50
7.1.80.0150.00916.27
7.1.70.0160.00715.27
7.1.60.0330.01933.68
7.1.50.0290.01133.16
7.1.40.0270.01432.70
7.1.30.0280.01432.94
7.1.20.0280.01532.96
7.1.10.0110.01115.00
7.1.00.0100.01415.18

preferences:
28.22 ms | 403 KiB | 5 Q