From 265224778bc340b16087e60a52b4ca4a3acb5c01 Mon Sep 17 00:00:00 2001 From: Marcel Araujo Date: Fri, 21 Jun 2013 23:08:15 -0300 Subject: [PATCH] Use in preg_replace_callback() using variables by reference and test for bug #64979 --- ...ure_static_variable.phpt => bug64979.phpt} | 62 ++++++++++--------- Zend/tests/closure_047.phpt | 26 ++++++++ Zend/tests/closure_048.phpt | 26 ++++++++ 3 files changed, 84 insertions(+), 30 deletions(-) rename Zend/tests/{generators/generator_closure_static_variable.phpt => bug64979.phpt} (73%) create mode 100644 Zend/tests/closure_047.phpt create mode 100644 Zend/tests/closure_048.phpt diff --git a/Zend/tests/generators/generator_closure_static_variable.phpt b/Zend/tests/bug64979.phpt similarity index 73% rename from Zend/tests/generators/generator_closure_static_variable.phpt rename to Zend/tests/bug64979.phpt index 01d7240788..09de555546 100644 --- a/Zend/tests/generators/generator_closure_static_variable.phpt +++ b/Zend/tests/bug64979.phpt @@ -1,30 +1,32 @@ ---TEST-- -Closures with static variables can be generators ---FILE-- - ---EXPECT-- -int(1) -int(2) -int(1) \ No newline at end of file +--TEST-- +Bug #64578 (Closures with static variables can be generators) +--XFAIL-- +Bug #64979 not fixed yet. +--FILE-- + +--EXPECT-- +int(1) +int(2) +int(1) diff --git a/Zend/tests/closure_047.phpt b/Zend/tests/closure_047.phpt new file mode 100644 index 0000000000..2377bef6b7 --- /dev/null +++ b/Zend/tests/closure_047.phpt @@ -0,0 +1,26 @@ +--TEST-- +Closure 047: Use in preg_replace_callback() using variables by reference +--FILE-- + +--EXPECT-- +a=0 +a=0, b=1 +a=0, b=1, c=2 +Done diff --git a/Zend/tests/closure_048.phpt b/Zend/tests/closure_048.phpt new file mode 100644 index 0000000000..40f2e2fbac --- /dev/null +++ b/Zend/tests/closure_048.phpt @@ -0,0 +1,26 @@ +--TEST-- +Closure 048: Use in preg_replace_callback() using variables by reference +--FILE-- + +--EXPECT-- +a=0 +a=0, b=1 +a=0, b=1, c=2 +Done -- 2.40.0