PHP code example of argo-php / docblock-parser

1. Go to this page and download the library: Download argo-php/docblock-parser 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/ */

    

argo-php / docblock-parser example snippets


use Argo\DocBlockParser\Parser;
use Argo\DocBlockParser\Context\ContextFactory;
use Argo\DocBlockParser\PhpDocFactory;

$phpDocParser = new Parser();
$phpDoc = $phpDocParser->parse('/** @var string $hello */');

use Argo\DocBlockParser\Parser;
use Argo\DocBlockParser\Context\ContextFactory;
use Argo\DocBlockParser\PhpDocFactory;

$phpDocFactory = new PhpDocFactory(new Parser(), new ContextFactory());

$reflection = new \ReflectionClass('MyClassWithPhpDoc');
$phpDoc = $phpDocFactory->getPhpDocFromReflector($reflection);