From:             schlueter at phpbar dot de
Operating system: Gentoo Linux
PHP version:      5.0.0b2 (beta2)
PHP Bug Type:     Zend Engine 2 problem
Bug description:  Wrong results from Reflection-API getDocComment() when called via 
STDIN

Description:
------------
While testing the examples from
http://sitten-polizei.de/php/reflection_api/docs/language.reflection.html
I found a (for me) unexpected beahvior with
Reflection_Function::getDocComment() and
Reflection_Method::getDocComment() the  when calling PHP on the command
line without paramter and copying a test script into my shell window, so
PHP can read it from STDIN. If I call the same script from a file or pipe
(cat test.php | /opt/php5/bin/php) all seems to work.

Reproduce code:
---------------
Example 14-5 from
http://sitten-polizei.de/php/reflection_api/docs/language.reflection.class.reflection_method.html

Expected result:
----------------
===> The user-defined final public static method 'increment' (which is a
regular method)
     declared in -
     lines 13 to 17
     having the modifiers 261[final public static]
---> Documentation:
 '/**
       * Increment counter
       *
       * @final
       * @static
       * @access  public
       * @return  int
       */'
---> Invokation results in: int(1)

Actual result:
--------------
===> The user-defined final public static method 'increment' (which is a
regular method)
     declared in /home/johannes/-
     lines 13 to 17
     having the modifiers 261[final public static]
---> Documentation:
 '
      final public static function increment)
final
       * @static
       * @access  public
       * @return  int
       */'
---> Invokation results in: int(1)

-- 
Edit bug report at http://bugs.php.net/?id=26456&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26456&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26456&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26456&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26456&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26456&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26456&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26456&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26456&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26456&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26456&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26456&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26456&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26456&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26456&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26456&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26456&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26456&r=float

Reply via email to