preg_match_all

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Perform a global regular expression match
<?php preg_match_all(    string $pattern,    string $subject,    array &$matches = null,    int $flags = 0,    int $offset = 0): int|false
<?php                 $replacement = '';



                if(isset($matches[1])) {

                    preg_match_all('/(?:\'|")(.*?)(?:\'|")/', $matches[1], $keys);



                    $replacement .= 'unset(';

                    foreach($keys[1] ?? [] as $key) {
<?php         $closingDirectivesPattern = static::directivesPattern($closings);




        preg_match_all(

            '/\B@(@?\w+(?:::\w+)?)([ \t]*)(\( ( [\S\s]*? ) \))?/x',

            $template,

            $matches

        );



        $offset = 0;