PHP code example of ircmaxell / php-cfg
1. Go to this page and download the library: Download ircmaxell/php-cfg 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/ */
ircmaxell / php-cfg example snippets
$parser = new PHPCfg\Parser(
(new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7)
);
$script = $parser->parse(file_get_contents(__FILE__), __FILE__);
$dumper = new PHPCfg\Printer\Text();
echo $dumper->printScript($script);