PhpRiot
Download This Article
Download this article in PDF format with all listings and files.

Price: $5.00 AUD
(Approx. $4.45 USD)

More information
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

Comments

Article Comments (2 total)

Stefan Marr, 21 September 2006

Nice article. Live generate documentation, interesting idea. Maybe the Extended Reflection API is something which is useful for this task (http://instantsvc.sourceforge.net/extended-reflection-api.php). It does parsing of docblocks and enhances the reflection API with a type system. It brings annotations to the PHP world, too.

In your article you mentioned the php_check_syntax() function. But in the current online documentation of this function is marked as deprecated. Did you know any other way to include a php-file with out running it's scripts?

Response from PhpRiot:

It may not be an ideal solution in that it's not natively PHP, but you could perhaps use the command line tool, such as the following:

<?php
    $filename = '/path/to/script.php';
    $cmd      = sprintf('/usr/local/bin/php -l %s', escapeshellarg($filename);
    
    $output = trim(`$cmd`);    
?>

Note the correct usage of backticks, and that you use the correct path to your CLI version of PHP.


marun, 27 June 2007

This code is no longer valid. Function php_check_syntax() has been removed from PHP since 5.0.5. See: http://www.php.net/manual/en/function.php-check-syntax.php.

Submit a Comment
Use the following form to submit a comment for this article. You can include any required code snippets, which we will format and highlight accordingly.


Note: Before your comment appears on PhpRiot, it must be manually approved. The email address field is optional. If you choose to include it, it will be displayed obfuscated to protect it from spammers.

In This Article


Tagged in , ,