|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-05-26 00:41 UTC] felipe@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: felipe
[2010-05-26 00:46 UTC] felipe@php.net
-Status: Assigned
+Status: Closed
[2010-05-26 00:46 UTC] felipe@php.net
[2010-05-26 00:46 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
Description: ------------ See below. Test script: --------------- <?php class Foo { const X = 1; public function x($x = array(1)) {} } $clazz = new ReflectionClass('Foo'); $method = $clazz->getMethod('x'); foreach ($method->getParameters() as $param) { if ( $param->isDefaultValueAvailable()) echo '$', $param->getName(), ' : ', var_export($param->getDefaultValue(), 1), "\n"; } Expected result: ---------------- No memleak. :) Actual result: -------------- $ sapi/cli/php ../bug.php $x : array ( 0 => 1, ) [Tue May 25 19:40:32 2010] Script: '../bug.php' /home/felipe/dev/php5_2/Zend/zend_compile.c(3415) : Freeing 0x08646078 (16 bytes), script=../bug.php [Tue May 25 19:40:32 2010] Script: '../bug.php' /home/felipe/dev/php5_2/ext/reflection/php_reflection.c(2174) : Freeing 0x08648CA4 (44 bytes), script=../bug.php /home/felipe/dev/php5_2/Zend/zend_variables.c(131) : Actual location (location was relayed) [Tue May 25 19:40:32 2010] Script: '../bug.php' /home/felipe/dev/php5_2/Zend/zend_variables.c(132) : Freeing 0x08648D00 (32 bytes), script=../bug.php /home/felipe/dev/php5_2/Zend/zend_alloc.c(2391) : Actual location (location was relayed) [Tue May 25 19:40:32 2010] Script: '../bug.php' /home/felipe/dev/php5_2/Zend/zend_hash.c(788) : Freeing 0x08648D50 (35 bytes), script=../bug.php /home/felipe/dev/php5_2/Zend/zend_hash.c(388) : Actual location (location was relayed) === Total 4 memory leaks detected ===