From:             timtowdi at yahoo dot com
Operating system: All
PHP version:      5.2.6
PHP Bug Type:     Feature/Change Request
Bug description:  Source filters

Description:
------------
It would be immensely useful to have a source filtering capability similar
to Perl:

http://perldoc.perl.org/perlfilter.html

Essentially, a way to allow a special block of code to execute and
"filter" through the source code of the script before it is fed through the
interpreter.

This would allow some very useful features, such as embedding debugging
code within comments, and then automatically executing that code if a
debugging filter is included into the script.  Thus, if the filter is left
out, the debugging code remains harmless comments:

<?php
include('debug.php');
$result = some_convoluted_function();
### Expected: 106852.244
### Got: $result
?>

This particular kind of example is based off the Perl Smart::Comments
module:

http://search.cpan.org/search?query=Smart%3A%3AComments&mode=module


-- 
Edit bug report at http://bugs.php.net/?id=45196&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45196&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45196&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45196&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45196&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45196&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45196&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45196&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45196&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45196&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45196&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45196&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45196&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45196&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45196&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45196&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45196&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45196&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45196&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45196&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45196&r=mysqlcfg

Reply via email to