PHP code example of michaeljoelphillips / ctags-php

1. Go to this page and download the library: Download michaeljoelphillips/ctags-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

michaeljoelphillips / ctags-php example snippets


use CTags\Reader;
use CTags\Tag;
use Generator;

$reader = Reader::fromFile('tags', true);

$reader->listAll();
$reader->match('MyClass');
$reader->partialMatch('My');

$reader->filter(static function (Tag $tag) {
    return $tag->name === 'MyClass' && $tag->fields['kind'] === 'c';
});

use CTags\Reader;

$reader = Reader::fromFile('tags', false);