- preg_match: documentation ( source)
- preg_last_error: documentation ( source)
- get_defined_constants: documentation ( source)
- array_flip: documentation ( source)
<?php
$x = preg_match('[asdf]','asdf');
echo array_flip(get_defined_constants(true)['pcre'])[preg_last_error()];