Permalink
Browse files

Merge branch 'PHP-5.5' of git.php.net:php-src into PHP-5.5

  • Loading branch information...
2 parents 85ad65e + a9f9ff6 commit ec136c219ef38113c3e6dc46850ae2ba8971ea5c @pierrejoye pierrejoye committed Apr 9, 2013
Showing with 72,430 additions and 47,940 deletions.
  1. +1 −1 Makefile.gcov
  2. +30 −1 NEWS
  3. +1 −0 UPGRADING
  4. +1 −1 Zend/acinclude.m4
  5. +2 −0 Zend/tests/bug43450.phpt
  6. +1 −0 Zend/tests/bug60771.phpt
  7. +42 −0 Zend/tests/bug64555.phpt
  8. +14 −0 Zend/tests/bug64578.phpt
  9. +7 −24 Zend/tests/generators/clone.phpt
  10. +0 −20 Zend/tests/generators/clone_after_object_call.phpt
  11. +0 −33 Zend/tests/generators/clone_with_foreach.phpt
  12. +0 −18 Zend/tests/generators/clone_with_properties.phpt
  13. +0 −18 Zend/tests/generators/clone_with_stack.phpt
  14. +0 −27 Zend/tests/generators/clone_with_symbol_table.phpt
  15. +0 −24 Zend/tests/generators/clone_with_this.phpt
  16. +1 −4 Zend/tests/generators/nested_method_calls.phpt
  17. +0 −8 Zend/tests/generators/yield_during_method_call.phpt
  18. +4 −3 Zend/zend_compile.c
  19. +1 −1 Zend/zend_compile.h
  20. +8 −10 Zend/zend_execute.c
  21. +1 −1 Zend/zend_execute_API.c
  22. +1 −170 Zend/zend_generators.c
  23. +1 −1 Zend/zend_hash.c
  24. +5 −1 Zend/zend_ini_parser.y
  25. +379 −332 Zend/zend_ini_scanner.c
  26. +4 −4 Zend/zend_ini_scanner.l
  27. +2 −2 Zend/zend_language_scanner.c
  28. +2 −2 Zend/zend_language_scanner.l
  29. +3 −1 acinclude.m4
  30. +3 −0 ext/curl/interface.c
  31. +99 −133 ext/date/lib/parse_date.c
  32. +1 −35 ext/date/lib/parse_date.re
  33. +18 −53 ext/date/lib/parse_iso_intervals.c
  34. +0 −35 ext/date/lib/parse_iso_intervals.re
  35. +34 −0 ext/date/lib/timelib.c
  36. +2 −0 ext/date/lib/timelib.h
  37. +179 −22 ext/date/php_date.c
  38. +3 −0 ext/date/php_date.h
  39. +5 −1 ext/date/tests/014.phpt
  40. +2 −2 ext/date/tests/DatePeriod_wrong_constructor.phpt
  41. +10 −2 ext/date/tests/DateTimeZone_clone_basic1.phpt
  42. +20 −4 ext/date/tests/DateTimeZone_clone_basic2.phpt
  43. +25 −5 ext/date/tests/DateTimeZone_clone_basic3.phpt
  44. +15 −3 ext/date/tests/DateTimeZone_construct_basic.phpt
  45. +35 −0 ext/date/tests/DateTimeZone_serialize_type_1.phpt
  46. +35 −0 ext/date/tests/DateTimeZone_serialize_type_2.phpt
  47. +13 −7 ext/date/tests/{DateTimeZone_serialize.phpt → DateTimeZone_serialize_type_3.phpt}
  48. +21 −7 ext/date/tests/DateTimeZone_verify.phpt
  49. +44 −0 ext/date/tests/bug60774.phpt
  50. +3 −3 ext/date/tests/date_format_error.phpt
  51. +30 −30 ext/date/tests/date_format_variation1.phpt
  52. +5 −5 ext/date/tests/date_offset_get_error.phpt
  53. +30 −30 ext/date/tests/date_offset_get_variation1.phpt
  54. +1 −1 ext/date/tests/date_timestamp_get.phpt
  55. +6 −6 ext/date/tests/date_timezone_get_error.phpt
  56. +31 −31 ext/date/tests/date_timezone_get_variation1.phpt
  57. +15 −3 ext/date/tests/timezone_open_basic1.phpt
  58. +0 −1 ext/dba/dba.c
  59. +63,904 −43,476 ext/fileinfo/data_file.c
  60. +1,031 −837 ext/fileinfo/libmagic.patch
  61. +736 −276 ext/fileinfo/libmagic/apprentice.c
  62. +7 −4 ext/fileinfo/libmagic/ascmagic.c
  63. +4 −4 ext/fileinfo/libmagic/cdf.c
  64. +3 −1 ext/fileinfo/libmagic/cdf.h
  65. +9 −9 ext/fileinfo/libmagic/cdf_time.c
  66. +13 −11 ext/fileinfo/libmagic/compress.c
  67. +2 −1 ext/fileinfo/libmagic/elfclass.h
  68. +41 −17 ext/fileinfo/libmagic/file.h
  69. +39 −34 ext/fileinfo/libmagic/fsmagic.c
  70. +15 −11 ext/fileinfo/libmagic/funcs.c
  71. +38 −66 ext/fileinfo/libmagic/magic.c
  72. +3 −0 ext/fileinfo/libmagic/magic.h
  73. +5 −1 ext/fileinfo/libmagic/patchlevel.h
  74. +17 −6 ext/fileinfo/libmagic/print.c
  75. +17 −7 ext/fileinfo/libmagic/readcdf.c
  76. +23 −13 ext/fileinfo/libmagic/readelf.c
  77. +251 −82 ext/fileinfo/libmagic/softmagic.c
  78. +1 −1 ext/fileinfo/tests/finfo_file_basic.phpt
  79. +9 −9 ext/fileinfo/tests/finfo_open_error.phpt
  80. +4,522 −1,794 ext/fileinfo/tests/magic
  81. +5 −5 ext/intl/breakiterator/breakiterator_methods.cpp
  82. +14 −2 ext/opcache/Optimizer/block_pass.c
  83. +5 −1 ext/opcache/README
  84. +70 −39 ext/opcache/ZendAccelerator.c
  85. +1 −2 ext/opcache/ZendAccelerator.h
  86. +1 −1 ext/opcache/shared_alloc_win32.c
  87. +34 −0 ext/opcache/tests/issue0079.phpt
  88. +30 −4 ext/opcache/zend_accelerator_module.c
  89. +17 −12 ext/opcache/zend_shared_alloc.c
  90. +0 −4 ext/opcache/zend_shared_alloc.h
  91. +1 −1 ext/skeleton/skeleton.c
  92. +1 −6 ext/soap/tests/bugs/bug34657.phpt
  93. +27 −18 ext/standard/array.c
  94. +5 −0 ext/standard/dl.c
  95. +1 −1 ext/standard/head.c
  96. +6 −3 ext/standard/http_fopen_wrapper.c
  97. +52 −0 ext/standard/tests/array/array_column_object_cast.phpt
  98. +1 −1 ext/standard/tests/file/bug44805.phpt
  99. +17 −19 ext/standard/tests/file/parse_ini_file.phpt
  100. +17 −19 ext/standard/tests/general_functions/parse_ini_string_001.phpt
  101. +86 −0 ext/standard/tests/streams/bug64433.phpt
  102. +14 −0 ext/standard/tests/streams/bug64433_srv.inc
  103. +2 −2 main/main.c
  104. +7 −8 main/streams/streams.c
  105. +3 −0 php.ini-development
  106. +3 −0 php.ini-production
  107. +1 −1 sapi/cli/php_cli.c
  108. +16 −5 sapi/cli/ps_title.c
  109. +67 −0 sapi/cli/tests/bug64529.phpt
  110. +20 −0 sapi/cli/tests/bug64544.phpt
  111. +10 −0 tests/func/011.phpt
  112. +10 −0 tests/func/bug64523.phpt
View
@@ -14,7 +14,7 @@ php_lcov.info: lcov-test
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
@echo
- -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
+ -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.c -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | $(EGREP) $(LCOV_INCLUDE) | uniq` ;\
for x in $$files; do \
echo -n . ;\
y=`echo $$x | sed -e 's!\.libs/!!'`; \
View
31 NEWS
@@ -1,14 +1,43 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-?? ??? 20??, PHP 5.5.0 Beta 2
+?? ??? 20??, PHP 5.5.0 Beta 3
- Core:
+ . Fixed bug #64578 (debug_backtrace in set_error_handler corrupts zend heap:
+ segfault). (Laruence)
+ . Fixed bug #64565 (copy doesn't report failure on partial copy). (Remi)
+ . Fixed bug #64555 (foreach no longer copies keys if they are interned).
+ (Nikita Popov)
+ . Fixed bugs #47675 and #64577 (fd leak on Solaris)
+
+- CURL:
+ . Added CURL_WRAPPERS_ENABLED constant. (Laruence)
+
+- DateTime
+ . Fixed bug #54567 (DateTimeZone serialize/unserialize) (Lonny
+ Kapelushnik, Derick)
+ . Fixed bug #60774 (DateInterval::format("%a") is always zero when an
+ interval is created using the createFromDateString method) (Lonny
+ Kapelushnik, Derick)
+
+- General improvements:
+ . Drop support for bison < 2.4 when building PHP from GIT source.
+ (Laruence)
+
+- Fileinfo:
+ . Upgraded libmagic to 5.14. (Anatol)
+
+28 Mar 2013, PHP 5.5.0 Beta 2
+
+- Core:
+ . Fixed bug #64544 (Valgrind warnings after using putenv). (Laruence)
. Fixed bug #64515 (Memoryleak when using the same variablename 2times in
function declaration). (Laruence)
. Fixed bug #64503 (Compilation fails with error: conflicting types for
'zendparse'). (Laruence)
. Fixed bug #64239 (Debug backtrace changed behavior since 5.4.10 or 5.4.11).
(Dmitry, Laruence)
+ . Fixed bug #64523, allow XOR in php.ini. (Dejan Marjanovic, Lars)
- Opcache:
. Fixed bug # 64490 (struct flock undefined on FreeBSD). (Joe Watkins)
View
@@ -295,6 +295,7 @@ PHP 5.5 UPGRADE NOTES
- cURL:
- Added CURLOPT_SAFE_UPLOAD to be used with curl_setopt().
+ - Added CURL_WRAPPERS_ENABLED to reflect --with-curlwrappers.
- GD
- Added constants for imageflip:
View
@@ -4,7 +4,7 @@ dnl This file contains local autoconf functions.
AC_DEFUN([LIBZEND_BISON_CHECK],[
# we only support certain bison versions
- bison_version_list="1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2"
+ bison_version_list="2.4 2.4.1 2.4.2 2.4.3 2.5 2.5.1 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7"
# for standalone build of Zend Engine
test -z "$SED" && SED=sed
View
@@ -2,6 +2,8 @@
Bug #43450 (Memory leak on some functions with implicit object __toString() call)
--SKIPIF--
<?php if (!function_exists('memory_get_usage')) die('memory_get_usage() not installed'); ?>
+--INI--
+opcache.enable_cli=0
--FILE--
<?php
error_reporting(E_ALL|E_STRICT);
View
@@ -4,6 +4,7 @@ test of larger than 8kb text file being parsed by require statement
<?php
file_put_contents('test.php',str_repeat('passed, ',1024));
require('test.php');
+ unlink('test.php');
?>
--EXPECT--
passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed, passed,
View
@@ -0,0 +1,42 @@
+--TEST--
+Bug #64555: Array key within interned string gets wrong hash value
+--FILE--
+<?php
+
+class Foo {
+ protected $unsetme = 1;
+ protected $keepme = 2;
+
+ public function test() {
+ $a = get_object_vars($this);
+
+ foreach ($a as $k => $v) {
+ if ($k == 'unsetme') {
+ echo "Unsetting: $k\n";
+ unset($a[$k]);
+ } else if ($k == 'keepme') {
+ echo "Changing: $k\n";
+ $a[$k] = 42;
+ $a['keepme'] = 43;
+ }
+ }
+
+ var_dump($a, array_keys($a));
+ }
+}
+
+$f = new Foo;
+$f->test();
+
+?>
+--EXPECT--
+Unsetting: unsetme
+Changing: keepme
+array(1) {
+ ["keepme"]=>
+ int(43)
+}
+array(1) {
+ [0]=>
+ string(6) "keepme"
+}
View
@@ -0,0 +1,14 @@
+--TEST--
+Bug #64578 (debug_backtrace in set_error_handler corrupts zend heap: segfault)
+--FILE--
+<?php
+
+set_error_handler(function($no, $err) { var_dump($err); });
+
+function x($s) { $s['a'] = 1; };
+$y = '1';
+x($y);
+print_r($y);
+--EXPECTF--
+string(25) "Illegal string offset 'a'"
+1
@@ -1,32 +1,15 @@
--TEST--
-Generators can be cloned
+Generators cannot be cloned
--FILE--
<?php
-function firstN($end) {
- for ($i = 0; $i < $end; ++$i) {
- yield $i;
- }
+function gen() {
+ yield;
}
-$g1 = firstN(5);
-var_dump($g1->current());
-$g1->next();
-
-$g2 = clone $g1;
-var_dump($g2->current());
-$g2->next();
-
-var_dump($g2->current());
-var_dump($g1->current());
-
-$g1->next();
-var_dump($g1->current());
+$gen = gen();
+clone $gen;
?>
---EXPECT--
-int(0)
-int(1)
-int(2)
-int(1)
-int(2)
+--EXPECTF--
+Fatal error: Trying to clone an uncloneable object of class Generator in %s on line %d
@@ -1,20 +0,0 @@
---TEST--
-Cloning a generator after an object method was called
---FILE--
-<?php
-
-class A { public function b() { } }
-
-function gen() {
- $a = new A;
- $a->b();
- yield;
-}
-
-$g1 = gen();
-$g1->rewind();
-$g2 = clone $g1;
-
-echo "Done";
---EXPECT--
-Done
@@ -1,33 +0,0 @@
---TEST--
-Cloning a generator with a foreach loop properly adds a ref for the loop var
---FILE--
-<?php
-
-function gen() {
- foreach ([1, 2, 3] as $i) {
- yield $i;
- }
-}
-
-$g1 = gen();
-var_dump($g1->current());
-
-$g2 = clone $g1;
-var_dump($g2->current());
-
-$g1->next();
-$g2->next();
-var_dump($g1->current());
-var_dump($g2->current());
-
-unset($g1);
-$g2->next();
-var_dump($g2->current());
-
-?>
---EXPECT--
-int(1)
-int(1)
-int(2)
-int(2)
-int(3)
@@ -1,18 +0,0 @@
---TEST--
-Tests cloning a generator with properties
---FILE--
-<?php
-
-function gen() { yield; }
-
-$g1 = gen();
-$g1->prop = 'val';
-
-$g2 = clone $g1;
-unset($g1);
-
-var_dump($g2->prop);
-
-?>
---EXPECT--
-string(3) "val"
@@ -1,18 +0,0 @@
---TEST--
-A generator with an active stack can be cloned
---FILE--
-<?php
-
-function gen() {
- var_dump(str_repeat("x", yield));
-}
-
-$g1 = gen();
-$g1->rewind();
-$g2 = clone $g1;
-unset($g1);
-$g2->send(10);
-
-?>
---EXPECT--
-string(10) "xxxxxxxxxx"
@@ -1,27 +0,0 @@
---TEST--
-A generator using a symbol table can be cloned
---FILE--
-<?php
-
-function gen() {
- // force compiled variable for $foo
- $foo = 'foo';
-
- // force symbol table
- extract(['foo' => 'bar']);
-
- // interrupt
- yield;
-
- var_dump($foo);
-}
-
-$g1 = gen();
-$g1->rewind();
-$g2 = clone $g1;
-unset($g1);
-$g2->next();
-
-?>
---EXPECT--
-string(3) "bar"
@@ -1,24 +0,0 @@
---TEST--
-Cloning a generator method (with $this)
---FILE--
-<?php
-
-class Test {
- protected $foo;
-
- public function gen() {
- $this->foo = 'bar';
- yield; // interrupt
- var_dump($this->foo);
- }
-}
-
-$g1 = (new Test)->gen();
-$g1->rewind(); // goto yield
-$g2 = clone $g1;
-unset($g1);
-$g2->next();
-
-?>
---EXPECT--
-string(3) "bar"
@@ -26,10 +26,7 @@ $g2 = gen(new B);
$g2->current();
$g1->next();
-
-$g3 = clone $g2;
-unset($g2);
-$g3->next();
+$g2->next();
?>
--EXPECT--
@@ -22,14 +22,6 @@ $gen = gen();
$gen->rewind();
unset($gen);
-// test cloning
-$g1 = gen();
-$g1->rewind();
-$g2 = clone $g1;
-unset($g1);
-$g2->send('bar');
-
?>
--EXPECT--
foo
-bar
View
@@ -1809,7 +1809,7 @@ void zend_do_end_function_declaration(const znode *function_token TSRMLS_DC) /*
zend_do_return(NULL, 0 TSRMLS_CC);
pass_two(CG(active_op_array) TSRMLS_CC);
- zend_release_labels(TSRMLS_C);
+ zend_release_labels(0 TSRMLS_CC);
if (CG(active_class_entry)) {
zend_check_magic_method_implementation(CG(active_class_entry), (zend_function*)CG(active_op_array), E_COMPILE_ERROR TSRMLS_CC);
@@ -2391,13 +2391,14 @@ void zend_do_goto(const znode *label TSRMLS_DC) /* {{{ */
}
/* }}} */
-void zend_release_labels(TSRMLS_D) /* {{{ */
+void zend_release_labels(int temporary TSRMLS_DC) /* {{{ */
{
if (CG(context).labels) {
zend_hash_destroy(CG(context).labels);
FREE_HASHTABLE(CG(context).labels);
+ CG(context).labels = NULL;
}
- if (!zend_stack_is_empty(&CG(context_stack))) {
+ if (!temporary && !zend_stack_is_empty(&CG(context_stack))) {
zend_compiler_context *ctx;
zend_stack_top(&CG(context_stack), (void**)&ctx);
View
@@ -643,7 +643,7 @@ void zend_do_resolve_class_name(znode *result, znode *class_name, int is_static
void zend_do_label(znode *label TSRMLS_DC);
void zend_do_goto(const znode *label TSRMLS_DC);
void zend_resolve_goto_label(zend_op_array *op_array, zend_op *opline, int pass2 TSRMLS_DC);
-void zend_release_labels(TSRMLS_D);
+void zend_release_labels(int temporary TSRMLS_DC);
ZEND_API void function_add_ref(zend_function *function);
Oops, something went wrong.

0 comments on commit ec136c2

Please sign in to comment.