for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Jasny\PhpdocParser\Tag;
/**
* Tag value represents an array
*/
class ArrayTag extends AbstractArrayTag
{
* Split value into items.
*
* @param string $value
* @return array
protected function splitValue(string $value): array
$regexp = '/(?<=^|,)\s*(?:\'(?:[^\']++|\\\\.)*\'|(?:"(?:[^"]++|\\\\.)*"|[^,\'"]+|[\'"])+)/';
preg_match_all($regexp, $value, $matches, PREG_PATTERN_ORDER); // regex can't fail
return $matches[0];
}