3v4l.org

run code in 300+ PHP versions simultaneously
<?php $chat = <<<CHAT <Amanda> Hi there, how are you? <Jack> Hi, im fine <Paul> sup yall <Petra> wasabi <Paul> shall we go for beers? <Petra> most definitely <Jack> see you later CHAT; preg_match_all( '/^<((?!Amanda>|Jack>)[^>]+)> \K.+/m', $chat, $matches, PREG_SET_ORDER ); $result = []; foreach ($matches as [$words, $name]) { $result[$name] = ($result[$name] ?? 0) + str_word_count($words); } var_export($result);

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.120.0160.00422.46
8.4.110.0130.00722.61
8.4.100.0140.00717.93
8.4.90.0110.01017.88
8.4.80.0080.01217.86
8.4.70.0110.00817.92
8.4.60.0120.01117.82
8.4.50.0130.00717.87
8.4.40.0100.01020.51
8.4.30.0150.00618.93
8.4.20.0100.01022.38
8.4.10.0030.01321.96
8.3.250.0140.00518.98
8.3.240.0140.00316.54
8.3.230.0110.00816.72
8.3.220.0120.00617.07
8.3.210.0130.00816.62
8.3.200.0090.01016.66
8.3.190.0100.00916.67
8.3.180.0130.00616.81
8.3.170.0130.00618.78
8.3.160.0090.01018.40
8.3.150.0160.00319.00
8.3.140.0050.00317.02
8.3.130.0080.00018.73
8.3.120.0060.00618.78
8.3.110.0090.00320.94
8.3.100.0090.00024.06
8.3.90.0080.00626.77
8.3.80.0060.00318.56
8.3.70.0040.01116.48
8.3.60.0160.00718.43
8.3.50.0000.01518.58
8.3.40.0070.00721.92
8.3.30.0030.01218.93
8.3.20.0040.00424.18
8.3.10.0060.00324.66
8.3.00.0040.00426.16
8.2.290.0150.00320.71
8.2.280.0020.00816.79
8.2.270.0040.00816.81
8.2.260.0090.00918.95
8.2.250.0160.00316.80
8.2.240.0140.00417.42
8.2.230.0030.00622.58
8.2.220.0060.00337.54
8.2.210.0040.01126.77
8.2.200.0060.00318.66
8.2.190.0080.00816.63
8.2.180.0140.00416.63
8.2.170.0180.00419.08
8.2.160.0100.00322.96
8.2.150.0000.00825.66
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0080.00019.63
8.2.110.0040.00421.30
8.2.100.0130.00617.97
8.2.90.0050.00318.09
8.2.80.0090.00317.97
8.2.70.0040.00417.75
8.2.60.0030.00617.88
8.2.50.0050.00819.52
8.2.40.0080.00819.52
8.2.30.0090.00719.52
8.2.20.0050.00719.52
8.2.10.0120.00519.52
8.2.00.0070.00919.52
8.1.330.0120.00816.85
8.1.320.0100.00916.43
8.1.310.0110.00716.77
8.1.300.0040.00418.54
8.1.290.0030.00630.84
8.1.280.0060.01025.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0050.00228.09
8.1.240.0060.00320.82
8.1.230.0110.00022.03
8.1.220.0030.00617.79
8.1.210.0060.00318.91
8.1.200.0040.00417.35
8.1.190.0030.00717.48
8.1.180.0170.00419.52
8.1.170.0120.00519.52
8.1.160.0120.00419.52
8.1.150.0100.00719.52
8.1.140.0070.00919.52
8.1.130.0100.00719.52
8.1.120.0120.00519.52
8.1.110.0140.00319.52
8.1.100.0150.00119.52
8.1.90.0120.00419.52
8.1.80.0140.00219.52
8.1.70.0120.00419.52
8.1.60.0170.00219.52
8.1.50.0140.00519.52
8.1.40.0150.00319.52
8.1.30.0100.00919.52
8.1.20.0140.00419.52
8.1.10.0090.00819.52
8.1.00.0100.00919.52
8.0.300.0040.00419.94
8.0.290.0050.00317.00
8.0.280.0130.00319.52
8.0.270.0140.00319.52
8.0.260.0130.00419.52
8.0.250.0110.00619.52
8.0.240.0160.00019.52
8.0.230.0090.00819.52
8.0.220.0120.00519.52
8.0.210.0120.00519.52
8.0.200.0040.01219.52
8.0.190.0150.00219.52
8.0.180.0110.00619.52
8.0.170.0120.00519.52
8.0.160.0140.00319.52
8.0.150.0110.00619.52
8.0.140.0140.00319.52
8.0.130.0030.01119.52
8.0.120.0110.00519.52
8.0.110.0120.00419.52
8.0.100.0110.00519.52
8.0.90.0120.00519.52
8.0.80.0040.01319.52
8.0.70.0140.00319.52
8.0.60.0120.00419.52
8.0.50.0120.00419.52
8.0.30.0150.00119.52
8.0.20.0080.00819.52
8.0.10.0130.00519.52

preferences:
29.09 ms | 403 KiB | 5 Q