?? ??? 2014, PHP 5.6.0 Release Candidate 2
- Core:
+ . Fixed bug #67368 (Memory leak with immediately dereferenced array in class
+ constant). (Laruence)
. Fixed bug #67468 (Segfault in highlight_file()/highlight_string()).
(Andreas Ferber)
--- /dev/null
+--TEST--
+Bug #67368 (Memory leak with immediately dereferenced array in class constant)
+--INI--
+report_memleaks=1
+--FILE--
+<?php
+class FooBar {
+ const bar = ["bar" => 3]["bar"];
+}
+echo "okey";
+--EXPECTF--
+okey
{
zval *tmp;
zend_fetch_dimension_by_zval(&tmp, &op1, &op2 TSRMLS_CC);
- *result = *tmp;
- efree(tmp);
+ ZVAL_ZVAL(result, tmp, 1, 1);
}
zval_dtor(&op1);
zval_dtor(&op2);