diff options
| author | Felipe Pena <felipensp@gmail.com> | 2012-06-22 12:05:55 -0300 |
|---|---|---|
| committer | Felipe Pena <felipensp@gmail.com> | 2012-06-22 12:05:55 -0300 |
| commit | 4af92aca872d7463b671c037f9d3b782e22a7c9c (patch) | |
| tree | 513b8e2ca82f07c0763e78387a956fe875e45509 /ext/reflection/tests | |
| parent | af516750ff32f69c1df10155fa8ec0c9cc5b70ff (diff) | |
| parent | b8e946b02eac53f46cbfc8eefb5c91fb5b075c9d (diff) | |
| download | php-git-4af92aca872d7463b671c037f9d3b782e22a7c9c.tar.gz | |
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
- Fixed bug #62384 (Attempting to invoke a Closure more than once causes segfaul)
Diffstat (limited to 'ext/reflection/tests')
| -rw-r--r-- | ext/reflection/tests/bug62384.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug62384.phpt b/ext/reflection/tests/bug62384.phpt new file mode 100644 index 0000000000..90a871fa2a --- /dev/null +++ b/ext/reflection/tests/bug62384.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #62384 (Attempting to invoke a Closure more than once causes segfaul) +--FILE-- +<?php + +$closure1 = function($val){ return $val; }; +$closure2 = function($val){ return $val; }; + +$reflection_class = new ReflectionClass($closure1); +$reflection_method = $reflection_class->getMethod('__invoke'); + +$arguments1 = array('hello'); +$arguments2 = array('world'); + +var_dump($reflection_method->invokeArgs($closure1, $arguments1)); +var_dump($reflection_method->invokeArgs($closure2, $arguments2)); + +?> +--EXPECT-- +string(5) "hello" +string(5) "world" |
