- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$content = ' @see MyType this is a @description
spanning over multiple lines.
@ignore
@link http://www.phpdoc.org';
preg_match_all('
/
(?:\A|\n)\s*
(?:
(?:
(?<T_SEE>@see)
\ +
(?<T_SEE_TARGET>[^ ]+?)
)|
(?<T_TAG_NAME>@[\pL-_]+)
)
\ *
(?<T_TAG_DESCRIPTION>.*?)
(?=\n\s*@|\Z)
/sux',
$content,
$matches,
PREG_SET_ORDER
);
var_dump($matches);