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"; }
Output for git.master_jit, git.master, rfc.property-hooks
array(3) { [0]=> string(3) "one" [1]=> string(14) "two three four" [2]=> string(9) "six seven" } --- array(1) { [0]=> string(3) "foo" } --- array(4) { [0]=> string(6) "fee fi" [1]=> string(3) "foe" [2]=> string(3) "fum" [3]=> string(17) "gimme those beans" } --- array(10) { [0]=> string(7) "one a b" [1]=> string(7) "two d e" [2]=> string(7) "three h" [3]=> string(8) "four i j" [4]=> string(8) "five k l" [5]=> string(5) "six n" [6]=> string(9) "seven o p" [7]=> string(7) "eight q" [8]=> string(8) "nine r s" [9]=> string(7) "ten u v" } ---

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
51.18 ms | 1068 KiB | 4 Q