cvs: pear /PHP_Parser/docs/examples test1.php test2.php

From: Date: Thu, 20 May 2004 01:39:07 +0000
Subject: cvs: pear /PHP_Parser/docs/examples test1.php test2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-19674@lists.php.net to get a copy of this message
alan_k Wed May 19 21:39:07 2004 EDT Added files: /pear/PHP_Parser/docs/examples test2.php Modified files: /pear/PHP_Parser/docs/examples test1.php Log: update tests with some simple notes - show example of both parsers http://cvs.php.net/diff.php/pear/PHP_Parser/docs/examples/test1.php?r1=1.2&r2=1.3&ty=u Index: pear/PHP_Parser/docs/examples/test1.php diff -u pear/PHP_Parser/docs/examples/test1.php:1.2 pear/PHP_Parser/docs/examples/test1.php:1.3 --- pear/PHP_Parser/docs/examples/test1.php:1.2 Wed May 19 10:35:50 2004 +++ pear/PHP_Parser/docs/examples/test1.php Wed May 19 21:39:07 2004 @@ -3,11 +3,17 @@ require_once 'PHP/Parser.php'; -//print_r(PHP_Parser::staticParseFile(__FILE__)); +// this uses the very simple parser. (Core.jay) +// you can use this as a base to write your own Parser $p = PHP_Parser::factory(); print_r($p->parseString(file_get_contents(__FILE__))); +class test { + function test() { + echo "hello world"; + } +} http://cvs.php.net/co.php/pear/PHP_Parser/docs/examples/test2.php?r=1.1&p=1 Index: pear/PHP_Parser/docs/examples/test2.php +++ pear/PHP_Parser/docs/examples/test2.php <?php require_once 'PHP/Parser.php'; //this uses gregs more advanced parser //pulls out more detailed information from the file. $p = PHP_Parser::factory('Structure','Structure'); print_r($p->parseString(file_get_contents(__FILE__))); class test { function test() { echo "hello world"; } }

« previous php.pear.cvs (#19674) next »