3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ (object) ['content' => 'one, two three four five, six seven'], (object) ['content' => 'foo'], (object) ['content' => 'fee fi, foe, fum, gimme those beans dude'], (object) ['content' => 'one a b c, two d e f g, three h, four i j, five k l m, six n, seven o p, eight q, nine r s t, ten u v w x, eleven y and z'], ]; foreach ($tests as $metakw) { preg_match_all( '/(?:^|, *\K)[^, ]+(?: *[^, ]+){0,2}/', $metakw->content, $matches, ); var_dump( array_slice($matches[0], 0, 10) ); echo "\n---\n"; }

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.30.0120.00719.43
8.5.20.0070.00920.23
8.5.10.0090.00819.52
8.5.00.0130.00820.46
8.4.180.0160.00921.93
8.4.170.0110.01020.54
8.4.160.0100.01023.71
8.4.150.0100.00316.93
8.4.140.0100.01117.80
8.4.130.0110.01017.79
8.4.120.0070.01120.80
8.4.110.0130.00818.88
8.4.100.0120.00917.98
8.4.90.0060.00420.59
8.4.80.0070.01319.18
8.4.70.0100.01118.89
8.4.60.0120.00920.49
8.4.50.0140.00618.60
8.4.40.0150.00617.76
8.4.30.0120.00318.70
8.4.20.0180.00319.64
8.4.10.0080.00819.61
8.3.300.0110.00920.77
8.3.290.0080.01320.75
8.3.280.0120.01018.63
8.3.270.0120.00716.66
8.3.260.0060.01316.76
8.3.250.0060.00419.11
8.3.240.0040.00716.87
8.3.230.0120.00716.79
8.3.220.0060.00119.01
8.3.210.0110.00916.94
8.3.200.0060.00216.97
8.3.190.0070.00117.06
8.3.180.0100.00919.04
8.3.170.0110.00717.08
8.3.160.0030.00618.73
8.3.150.0090.00917.31
8.3.140.0090.00920.74
8.3.130.0080.00018.77
8.3.120.0030.00518.65
8.3.110.0170.00316.91
8.3.100.0360.01116.34
8.3.90.0460.00716.62
8.3.80.0430.01216.88
8.3.70.0280.01716.75
8.3.60.0340.01016.63
8.3.50.0400.00716.38
8.3.40.0310.01017.63
8.3.30.0310.00617.75
8.3.20.0210.00717.50
8.3.10.0190.00017.75
8.3.00.0080.00417.71
8.2.300.0120.00822.08
8.2.290.0040.00417.10
8.2.280.0060.00318.75
8.2.270.0060.00316.86
8.2.260.0130.00316.97
8.2.250.0040.00416.98
8.2.240.0080.00017.08
8.2.230.0200.01016.38
8.2.220.0240.01416.58
8.2.210.0270.01216.16
8.2.200.0290.01316.59
8.2.190.0320.01516.50
8.2.180.0310.01116.41
8.2.170.0430.00017.88
8.2.160.0290.00017.63
8.2.150.0180.00417.88
8.2.140.0150.00717.72
8.2.130.0320.00617.37
8.2.120.0350.01017.50
8.2.110.0350.01117.63
8.2.100.0410.00617.50
8.2.90.0480.00017.86
8.2.80.0380.00617.75
8.2.70.0340.01117.61
8.2.60.0350.00317.63
8.2.50.0260.00317.36
8.2.40.0210.00017.75
8.2.30.0150.00517.49
8.2.20.0200.00017.38
8.2.10.0190.00017.63
8.2.00.0130.00717.61
8.1.340.0130.00817.71
8.1.330.0080.00116.32
8.1.320.0130.00618.00
8.1.310.0040.00416.90
8.1.300.0040.00418.30
8.1.290.0150.00516.38
8.1.280.0170.00316.38
8.1.270.0120.00617.39
8.1.260.0100.01017.48
8.1.250.0180.00317.50
8.1.240.0330.00317.38
8.1.230.0150.00817.38
8.1.220.0210.00517.48
8.1.210.0360.00717.35
8.1.200.0180.01417.35
8.1.190.0330.00717.35
8.1.180.0250.00917.25
8.1.170.0340.00717.38
8.1.160.0280.01617.50
8.1.150.0290.00617.25
8.1.140.0290.00317.38
8.1.130.0320.00417.23
8.1.120.0230.01117.50
8.1.110.0250.00817.23
8.1.100.0240.00817.50
8.1.90.0260.00617.50
8.1.80.0240.01417.38
8.1.70.0310.00817.25
8.1.60.0320.01117.63
8.1.50.0400.00017.50
8.1.40.0350.00617.38
8.1.30.0350.00817.38
8.1.20.0310.01117.63
8.1.10.0350.01017.38
8.1.00.0400.00617.35

preferences:
54.13 ms | 1067 KiB | 5 Q