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) { var_dump( array_slice( preg_split( '/(?:[^, ]+\K *){1,3}[^,]*,? */', $metakw->content, 11, PREG_SPLIT_NO_EMPTY ), 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.0100.00819.64
8.5.20.0090.00920.10
8.5.10.0110.00819.52
8.5.00.0130.00920.41
8.4.180.0120.01119.78
8.4.170.0100.01223.88
8.4.160.0060.00323.94
8.4.150.0060.00617.08
8.4.140.0130.01017.77
8.4.130.0070.00318.17
8.4.120.0130.00722.09
8.4.110.0050.00622.52
8.4.100.0140.00718.16
8.4.90.0100.01020.21
8.4.80.0120.00917.97
8.4.70.0060.01018.04
8.4.60.0130.00918.69
8.4.50.0100.01117.94
8.4.40.0060.00317.80
8.4.30.0140.00320.66
8.4.20.0150.00619.82
8.4.10.0120.00819.61
8.3.300.0130.00722.79
8.3.290.0130.00920.94
8.3.280.0120.00818.70
8.3.270.0140.00616.67
8.3.260.0110.00916.70
8.3.250.0120.00818.79
8.3.240.0070.00917.06
8.3.230.0140.00616.99
8.3.220.0120.00517.20
8.3.210.0100.00816.89
8.3.200.0060.00316.97
8.3.190.0150.00518.96
8.3.180.0100.00919.03
8.3.170.0100.00917.17
8.3.160.0130.00618.96
8.3.150.0180.00017.21
8.3.140.0140.00020.59
8.3.130.0060.00318.46
8.3.120.0080.00818.68
8.3.110.0310.01016.73
8.3.100.0420.00616.53
8.3.90.0390.00916.74
8.3.80.0450.00617.00
8.3.70.0350.01316.50
8.3.60.0360.01016.75
8.3.50.0390.00616.75
8.3.40.0260.00617.63
8.3.30.0260.00717.75
8.3.20.0380.00717.47
8.3.10.0300.01017.61
8.3.00.0430.00017.71
8.2.300.0110.00922.10
8.2.290.0140.00520.53
8.2.280.0140.00519.01
8.2.270.0060.00316.91
8.2.260.0090.00017.04
8.2.250.0100.00716.84
8.2.240.0060.00317.41
8.2.230.0250.01416.66
8.2.220.0190.01916.48
8.2.210.0330.00716.42
8.2.200.0340.00416.50
8.2.190.0130.00616.63
8.2.180.0050.01416.75
8.2.170.0360.00417.98
8.2.160.0310.00717.98
8.2.150.0390.00617.63
8.2.140.0200.00917.75
8.2.130.0240.01117.63
8.2.120.0360.00917.88
8.2.110.0240.00717.61
8.2.100.0260.00617.63
8.2.90.0170.00317.88
8.2.80.0320.00717.50
8.2.70.0260.00617.63
8.2.60.0180.00317.88
8.2.50.0250.01617.50
8.2.40.0380.00317.63
8.2.30.0330.00717.50
8.2.20.0360.00417.48
8.2.10.0310.00817.63
8.2.00.0340.00717.50
8.1.340.0150.00818.03
8.1.330.0140.00421.95
8.1.320.0100.00916.56
8.1.310.0120.00616.73
8.1.300.0000.00818.60
8.1.290.0350.00816.11
8.1.280.0330.01316.13
8.1.270.0440.01517.29
8.1.260.0440.00317.38
8.1.250.0370.01017.13
8.1.240.0320.01017.24
8.1.230.0360.00617.25
8.1.220.0280.00917.38
8.1.210.0280.01117.25
8.1.200.0310.00617.36
8.1.190.0260.00817.25
8.1.180.0240.00817.23
8.1.170.0230.01517.25
8.1.160.0230.01717.23
8.1.150.0310.00917.48
8.1.140.0350.00517.38
8.1.130.0330.00617.10
8.1.120.0290.01117.59
8.1.110.0240.01417.25
8.1.100.0300.01217.25
8.1.90.0260.00917.38
8.1.80.0320.00417.25
8.1.70.0200.01617.09
8.1.60.0100.01017.72
8.1.50.0190.00317.21
8.1.40.0180.00317.38
8.1.30.0150.00517.63
8.1.20.0150.00417.63
8.1.10.0160.00417.50
8.1.00.0180.00317.25

preferences:
52.71 ms | 1067 KiB | 5 Q