Ticket #229 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

ReflectionMethod::getDocComment fails in PHP 5.2

Reported by: pmineault Assigned to: somebody
Priority: major Milestone: 0.9.6
Component: eAccelerator Version: 0.9.5
Keywords: Reflection ReflectionMethod ReflectionClass getDocComment PHP5 Cc:

Description

Once a file has been cached, ReflectionClass? and ReflectionMethod::getDocComment fail. Here is a simple test:

<?php
/**
 * This won't show up after reload
 */
class MyTest
{
	function dummyFunc()
	{
		
	}
}

$reflect = new ReflectionClass('MyTest');
echo($reflect->getDocComment());
?>

First access shows:

/** * This won't show up after reload */

Second access (reload page) shows nothing. Touching the file (adding a space and saving, for example) solves the issue on the next call but calls after that still have the same issue. I would get the doc comments are not kept in the cache files.

Change History

02/13/07 16:36:45 changed by bart

  • status changed from new to closed.
  • resolution set to fixed.

In the previous version we removed the caching code for comments. Because some people still need the comments for reflection stuff it's possible to enabled that caching code again, run configure with the --with-eaccelerator-doc-comment-inclusion switch. Make sure you clean your cache directory after enabling this!