- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$content = <<<CONTENT
bab
@tag
CONTENT;
$matches = array();
var_dump(preg_match('/^a/', $content, $matches, 0, 1) === 1);
var_dump(preg_match('/^(\A|\n)\w*@/', $content, $matches, 0, 1) === 1);