From fc92eeeadf6f5487ef3f8973f6ac958278351998 Mon Sep 17 00:00:00 2001 From: Danack Date: Wed, 1 Jun 2016 21:53:01 +0100 Subject: [PATCH] Added reflection test. Standardised filename for other tests. --- ...Function.inc => cloure_from_callbable.inc} | 0 ....phpt => cloure_from_callbable_basic.phpt} | 2 +- ....phpt => cloure_from_callbable_error.phpt} | 2 +- .../cloure_from_callbable_reflection.phpt | 48 +++++++++++++++++++ Zend/zend_closures.c | 2 +- 5 files changed, 51 insertions(+), 3 deletions(-) rename Zend/tests/closures/{closureFunction.inc => cloure_from_callbable.inc} (100%) rename Zend/tests/closures/{closureFunction_basic.phpt => cloure_from_callbable_basic.phpt} (99%) rename Zend/tests/closures/{closureFunction_error.phpt => cloure_from_callbable_error.phpt} (99%) create mode 100644 Zend/tests/closures/cloure_from_callbable_reflection.phpt diff --git a/Zend/tests/closures/closureFunction.inc b/Zend/tests/closures/cloure_from_callbable.inc similarity index 100% rename from Zend/tests/closures/closureFunction.inc rename to Zend/tests/closures/cloure_from_callbable.inc diff --git a/Zend/tests/closures/closureFunction_basic.phpt b/Zend/tests/closures/cloure_from_callbable_basic.phpt similarity index 99% rename from Zend/tests/closures/closureFunction_basic.phpt rename to Zend/tests/closures/cloure_from_callbable_basic.phpt index 676c6434634..c498a9644b0 100644 --- a/Zend/tests/closures/closureFunction_basic.phpt +++ b/Zend/tests/closures/cloure_from_callbable_basic.phpt @@ -3,7 +3,7 @@ Testing closure() functionality --FILE-- +--FILE-- +getParameters() as $param) { + if ($param->hasType()) { + $type = $param->getType(); + echo $type->__toString() . "\n"; + } + } +} + +?> +--EXPECTF-- +Bar +int +Bar +int +Bar +int +Bar +int diff --git a/Zend/zend_closures.c b/Zend/zend_closures.c index 4d2eddfcbd6..dadf461d712 100644 --- a/Zend/zend_closures.c +++ b/Zend/zend_closures.c @@ -589,7 +589,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_call, 0, 0, 1) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_closure_fromcallable, 0, 0, 1) - ZEND_ARG_INFO(0, newthis) + ZEND_ARG_INFO(0, callable) ZEND_END_ARG_INFO() static const zend_function_entry closure_functions[] = {