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"; }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
149.73 ms | 1685 KiB | 11 Q