]> granicus.if.org Git - php/commitdiff
Remove mentions of "type hint" and "typehint"
authorLevi Morrison <levim@php.net>
Tue, 20 Oct 2015 16:50:13 +0000 (10:50 -0600)
committerJulien Pauli <jpauli@php.net>
Thu, 24 Dec 2015 14:19:31 +0000 (15:19 +0100)
78 files changed:
Zend/tests/bug42802.phpt
Zend/tests/bug69767.phpt
Zend/tests/closure_059.phpt
Zend/tests/errmsg_013.phpt
Zend/tests/generators/get_return.phpt
Zend/tests/ns_055.phpt
Zend/tests/return_types/internal_functions001.phpt
Zend/tests/return_types/internal_functions002.phpt
Zend/tests/return_types/reflection001.phpt
Zend/tests/type_declarations/add_return_type.phpt [moved from Zend/tests/typehints/add_return_type.phpt with 100% similarity]
Zend/tests/type_declarations/array_001.phpt [moved from Zend/tests/array_type_hint_001.phpt with 54% similarity]
Zend/tests/type_declarations/callable_001.phpt [moved from Zend/tests/callable_type_hint_001.phpt with 87% similarity]
Zend/tests/type_declarations/callable_002.phpt [moved from Zend/tests/callable_type_hint_002.phpt with 92% similarity]
Zend/tests/type_declarations/callable_003.phpt [moved from Zend/tests/callable_type_hint_003.phpt with 92% similarity]
Zend/tests/type_declarations/closure_with_variadic.phpt [moved from Zend/tests/closure_with_variadic_typehint.phpt with 80% similarity]
Zend/tests/type_declarations/default_boolean_hint_values.phpt [moved from Zend/tests/typehints/default_boolean_hint_values.phpt with 100% similarity]
Zend/tests/type_declarations/explicit_weak_include_strict.phpt [moved from Zend/tests/typehints/explicit_weak_include_strict.phpt with 100% similarity]
Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt [moved from Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt with 84% similarity]
Zend/tests/type_declarations/internal_function_strict_mode.phpt [moved from Zend/tests/typehints/internal_function_strict_mode.phpt with 94% similarity]
Zend/tests/type_declarations/return_separation.phpt [moved from Zend/tests/typehints/return_separation.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_basic.phpt [moved from Zend/tests/typehints/scalar_basic.phpt with 97% similarity]
Zend/tests/type_declarations/scalar_constant_defaults.phpt [moved from Zend/tests/typehints/scalar_constant_defaults.phpt with 97% similarity]
Zend/tests/type_declarations/scalar_constant_defaults_error.phpt [moved from Zend/tests/typehints/scalar_constant_defaults_error.phpt with 80% similarity]
Zend/tests/type_declarations/scalar_float_with_integer_default_strict.phpt [moved from Zend/tests/typehints/scalar_float_with_integer_default_strict.phpt with 65% similarity]
Zend/tests/type_declarations/scalar_float_with_integer_default_weak.phpt [moved from Zend/tests/typehints/scalar_float_with_integer_default_weak.phpt with 68% similarity]
Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt [new file with mode: 0644]
Zend/tests/type_declarations/scalar_none.phpt [moved from Zend/tests/typehints/scalar_none.phpt with 97% similarity]
Zend/tests/type_declarations/scalar_null.phpt [moved from Zend/tests/typehints/scalar_null.phpt with 98% similarity]
Zend/tests/type_declarations/scalar_relative_typehint_disallowed.phpt [moved from Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt with 79% similarity]
Zend/tests/type_declarations/scalar_reserved2.phpt [moved from Zend/tests/typehints/scalar_reserved2.phpt with 62% similarity]
Zend/tests/type_declarations/scalar_reserved2_class_alias.phpt [moved from Zend/tests/typehints/scalar_reserved2_class_alias.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved2_use.phpt [moved from Zend/tests/typehints/scalar_reserved2_use.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved3.phpt [moved from Zend/tests/typehints/scalar_reserved3.phpt with 63% similarity]
Zend/tests/type_declarations/scalar_reserved3_class_alias.phpt [moved from Zend/tests/typehints/scalar_reserved3_class_alias.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved3_use.phpt [moved from Zend/tests/typehints/scalar_reserved3_use.phpt with 65% similarity]
Zend/tests/type_declarations/scalar_reserved4.phpt [moved from Zend/tests/typehints/scalar_reserved4.phpt with 63% similarity]
Zend/tests/type_declarations/scalar_reserved4_class_alias.phpt [moved from Zend/tests/typehints/scalar_reserved4_class_alias.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved4_use.phpt [moved from Zend/tests/typehints/scalar_reserved4_use.phpt with 65% similarity]
Zend/tests/type_declarations/scalar_reserved6.phpt [moved from Zend/tests/typehints/scalar_reserved6.phpt with 62% similarity]
Zend/tests/type_declarations/scalar_reserved6_class_alias.phpt [moved from Zend/tests/typehints/scalar_reserved6_class_alias.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved6_use.phpt [moved from Zend/tests/typehints/scalar_reserved6_use.phpt with 64% similarity]
Zend/tests/type_declarations/scalar_reserved7.phpt [moved from Zend/tests/typehints/scalar_reserved7.phpt with 65% similarity]
Zend/tests/type_declarations/scalar_return_basic.phpt [moved from Zend/tests/typehints/scalar_return_basic.phpt with 96% similarity]
Zend/tests/type_declarations/scalar_return_basic_64bit.phpt [moved from Zend/tests/typehints/scalar_return_basic_64bit.phpt with 96% similarity]
Zend/tests/type_declarations/scalar_strict.phpt [moved from Zend/tests/typehints/scalar_strict.phpt with 97% similarity]
Zend/tests/type_declarations/scalar_strict_64bit.phpt [moved from Zend/tests/typehints/scalar_strict_64bit.phpt with 97% similarity]
Zend/tests/type_declarations/scalar_strict_basic.phpt [moved from Zend/tests/typehints/scalar_strict_basic.phpt with 96% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_001.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_001.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_002.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_002.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_003.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_003.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_004.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_004.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_005.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_005.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_006.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_006.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_007.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_007.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_strict_declaration_placement_008.phpt [moved from Zend/tests/typehints/scalar_strict_declaration_placement_008.phpt with 100% similarity]
Zend/tests/type_declarations/scalar_weak_reference.phpt [moved from Zend/tests/typehints/scalar_weak_reference.phpt with 76% similarity]
Zend/tests/type_declarations/self_on_closure_in_method.phpt [moved from Zend/tests/typehints/self_on_closure_in_method.phpt with 100% similarity]
Zend/tests/type_declarations/strict_call_weak.phpt [moved from Zend/tests/typehints/strict_call_weak.phpt with 100% similarity]
Zend/tests/type_declarations/strict_call_weak_2.inc [moved from Zend/tests/typehints/strict_call_weak_2.inc with 100% similarity]
Zend/tests/type_declarations/strict_call_weak_explicit.phpt [moved from Zend/tests/typehints/strict_call_weak_explicit.phpt with 100% similarity]
Zend/tests/type_declarations/strict_call_weak_explicit_2.inc [moved from Zend/tests/typehints/strict_call_weak_explicit_2.inc with 100% similarity]
Zend/tests/type_declarations/strict_include_explicit_weak.phpt [moved from Zend/tests/typehints/strict_include_explicit_weak.phpt with 100% similarity]
Zend/tests/type_declarations/strict_include_explicit_weak_2.inc [moved from Zend/tests/typehints/strict_include_explicit_weak_2.inc with 100% similarity]
Zend/tests/type_declarations/strict_include_weak.phpt [moved from Zend/tests/typehints/strict_include_weak.phpt with 100% similarity]
Zend/tests/type_declarations/strict_include_weak_2.inc [moved from Zend/tests/typehints/strict_include_weak_2.inc with 100% similarity]
Zend/tests/type_declarations/strict_nested.phpt [moved from Zend/tests/typehints/strict_nested.phpt with 100% similarity]
Zend/tests/type_declarations/weak_call_strict.phpt [moved from Zend/tests/typehints/weak_call_strict.phpt with 100% similarity]
Zend/tests/type_declarations/weak_call_strict_2.inc [moved from Zend/tests/typehints/weak_call_strict_2.inc with 100% similarity]
Zend/tests/type_declarations/weak_explicit_call_strict.phpt [moved from Zend/tests/typehints/weak_explicit_call_strict.phpt with 100% similarity]
Zend/tests/type_declarations/weak_include_strict.phpt [moved from Zend/tests/typehints/weak_include_strict.phpt with 100% similarity]
Zend/tests/type_declarations/weak_include_strict_2.inc [moved from Zend/tests/typehints/weak_include_strict_2.inc with 100% similarity]
Zend/tests/typehints/scalar_float_with_invalid_default.phpt [deleted file]
Zend/tests/variadic/typehint_error.phpt
Zend/tests/variadic/typehint_suppressed_error.phpt
Zend/zend_compile.c
Zend/zend_compile.h
Zend/zend_inheritance.c
tests/lang/type_hints_003.phpt

index 3b00408e01627d02539e008553caa50652a12218..ebfb52882740437813e84779e61d33d6a106037f 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Bug #42802 (Namespace not supported in typehints)
+Bug #42802 (Namespace not supported in types)
 --FILE--
 <?php
 namespace foo;
index cf4d4e7f931178a99dc6e79281e117aee2df4193..9458546deaa2fcc06687b20712c021202046b701 100644 (file)
@@ -5,4 +5,4 @@ Bug #69767 (Default parameter value with wrong type segfaults)
 function foo(String $bar = 0) {}
 ?>
 --EXPECTF--
-Fatal error: Default value for parameters with a string type hint can only be string or NULL in %sbug69767.php on line %d
+Fatal error: Default value for parameters with a string type can only be string or NULL in %sbug69767.php on line %d
index 1ee7fe669575bb5180b47060f2b711e17eeb2fb3..299d8f5d9d4f9514579c402594bbae8005029941 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Closure 059: Closure type hinting
+Closure 059: Closure type declaration
 --FILE--
 <?php
 class A {
index d1f248ec281217a3985b93e6dc43077b03861933..327d75eae7d89b01ca979b5228375a57c3827c8b 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-errmsg: default value for parameters with array type hint can only be an array or NULL
+errmsg: default value for parameters with array type can only be an array or NULL
 --FILE--
 <?php
 
@@ -11,4 +11,4 @@ class test {
 echo "Done\n";
 ?>
 --EXPECTF--    
-Fatal error: Default value for parameters with array type hint can only be an array or NULL in %s on line %d
+Fatal error: Default value for parameters with array type can only be an array or NULL in %s on line %d
index c996eb4101e9a43b0fc7d7fa2ab62ca0d8c6071a..0d3e32af14593d940f43be9dc5f005bc26fec75b 100644 (file)
@@ -58,7 +58,7 @@ $gen->next();
 var_dump($gen->getReturn());
 
 // Explicit value-less return also results in a NULL generator
-// return value and there is no interference with type hints
+// return value and there is no interference with type declarations
 function gen6() : Generator {
     return;
     yield 24;
index a692e476014708d8f564c58a21aa9135e86346ce..16e3e6977737e6bbabcabcae2b5296b31c21521a 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-055: typehints in namespaces
+055: types in namespaces
 --FILE--
 <?php
 namespace test\ns1;
index 66c7123a4d1b876ce2303dcd6c2b82b2b18cd95e..fffaf54574535eaefc3489d5c58ee5bdaf9abc00 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Return type hinting for internal functions
+Return type for internal functions
 
 --SKIPIF--
 <?php
index 65838a1a6706779f57d17b36c0c5674a9cd7e806..7cdb2b884a5d40547ec7106f647ae389910566ba 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Return type hinting for internal functions 2
+Return type for internal functions 2
 
 --SKIPIF--
 <?php
index f616504747863434513ac576f19b63861c0dd29e..6492ee1906efdabff980d297d2fbd6684c6bd567 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Return type hinting and Reflection::export()
+Return type and Reflection::export()
 
 --SKIPIF--
 <?php
similarity index 54%
rename from Zend/tests/array_type_hint_001.phpt
rename to Zend/tests/type_declarations/array_001.phpt
index 2b473c56b4747b1aa6a37a0ef0496e02c1f8e51a..8fc368e2889710ca76e24575431df81b61bcc60a 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Array type hint
+Array type declaration
 --FILE--
 <?php
 function foo(array $a) {
@@ -12,8 +12,8 @@ foo(123);
 --EXPECTF--
 3
 
-Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
+Fatal error: Uncaught TypeError: Argument 1 passed to foo() must be of the type array, integer given, called in %s on line 7 and defined in %s:2
 Stack trace:
 #0 %s(%d): foo(123)
 #1 {main}
-  thrown in %sarray_type_hint_001.php on line 2
+  thrown in %s on line 2
similarity index 87%
rename from Zend/tests/callable_type_hint_001.phpt
rename to Zend/tests/type_declarations/callable_001.phpt
index 5ab892cd7ce335ec6d48dc42b862c168f422c3be..0466288d59a13122404495869237a3e7a5f56b9f 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-callable type hint#001
+callable type#001
 --FILE--
 <?php
 
@@ -21,7 +21,7 @@ foo($closure);
 string(6) "strpos"
 string(3) "foo"
 
-Deprecated: Non-static method bar::baz() should not be called statically in %scallable_type_hint_001.php on line %d
+Deprecated: Non-static method bar::baz() should not be called statically in %s on line %d
 array(2) {
   [0]=>
   string(3) "bar"
similarity index 92%
rename from Zend/tests/callable_type_hint_002.phpt
rename to Zend/tests/type_declarations/callable_002.phpt
index b1b7339c317e05cdffa3b0371361dd527d71051a..01b694575557f8a084af45dedb6c48d445171c4a 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-callable type hint#002 - Reflection
+callable type#002 - Reflection
 --FILE--
 <?php
 
similarity index 92%
rename from Zend/tests/callable_type_hint_003.phpt
rename to Zend/tests/type_declarations/callable_003.phpt
index 83f5090afac9b67a5d85fd73021843794b465db2..b5e722cae3b14401dc3e678a2225c547325b7f98 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-callable type hint#003
+callable type#003
 --FILE--
 <?php
 
similarity index 80%
rename from Zend/tests/closure_with_variadic_typehint.phpt
rename to Zend/tests/type_declarations/closure_with_variadic.phpt
index 3e91a6f17695b1ce3f2acaaf1395448dd163a423..acbf57fa5582fb9fb1293e5f501d8fb312e56e10 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Closure with variadic type hint
+Closure with variadic type declaration
 --FILE--
 <?php
 $f = function (stdClass ...$a) {
similarity index 84%
rename from Zend/tests/typehints/inexistent_class_hint_with_scalar_arg.phpt
rename to Zend/tests/type_declarations/inexistent_class_hint_with_scalar_arg.phpt
index 3bacf826d519669ee873d1d0d528e4ca1986cafa..2f6c881017d90f93acecbc4c11d247b20993ce5f 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Inexistent class as typehint receiving scalar argument
+Inexistent class as type receiving scalar argument
 --FILE--
 <?php
 
similarity index 94%
rename from Zend/tests/typehints/internal_function_strict_mode.phpt
rename to Zend/tests/type_declarations/internal_function_strict_mode.phpt
index f501c2b75f73b36de5d537715dbd9154adf498ee..4e792fa8d17396ad5be67edb8024a33a54a870b1 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint - internal function strict mode
+Scalar type - internal function strict mode
 --FILE--
 <?php
 declare(strict_types=1);
@@ -32,4 +32,4 @@ try {
 *** Trying Array Map With Invalid Callback
 *** Caught array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object
 *** Trying Strlen With Float
-*** Caught strlen() expects parameter 1 to be string, float given
\ No newline at end of file
+*** Caught strlen() expects parameter 1 to be string, float given
similarity index 97%
rename from Zend/tests/typehints/scalar_basic.phpt
rename to Zend/tests/type_declarations/scalar_basic.phpt
index f27dc2b8859ef31bb6128fca5397077871f459e4..51c36647373acf98b69fb11bb0bae015abc7b6b5 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint basics
+Scalar type basics
 --FILE--
 <?php
 
@@ -45,7 +45,7 @@ $values = [
 ];
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         echo PHP_EOL . "*** Trying ";
         var_dump($value);
@@ -60,7 +60,7 @@ echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
 
-Testing 'int' typehint:
+Testing 'int' type:
 
 *** Trying int(1)
 int(1)
@@ -114,7 +114,7 @@ int(0)
 *** Trying resource(%d) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 
 *** Trying int(1)
 float(1)
@@ -168,7 +168,7 @@ float(0)
 *** Trying resource(%d) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 
 *** Trying int(1)
 string(1) "1"
@@ -221,7 +221,7 @@ string(6) "foobar"
 *** Trying resource(%d) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 
 *** Trying int(1)
 bool(true)
similarity index 97%
rename from Zend/tests/typehints/scalar_constant_defaults.phpt
rename to Zend/tests/type_declarations/scalar_constant_defaults.phpt
index 4441022e16923453d22e989dea10d2434fce38db..2982d9b2afd86c1f152ab597ca70f086b74c076e 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint - default via constants
+Scalar type - default via constants
 --FILE--
 <?php
 
@@ -80,4 +80,4 @@ string(14) "this is a test"
 Testing int with default null constant
 NULL
 Testing int with null null constant
-NULL
\ No newline at end of file
+NULL
similarity index 80%
rename from Zend/tests/typehints/scalar_constant_defaults_error.phpt
rename to Zend/tests/type_declarations/scalar_constant_defaults_error.phpt
index f341d205af44e7f68356307ef127268631c1da1a..dcbb3e87f4fa084950b7342d1ebfacbc1f5ef328 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint - default via constants - error condition
+Scalar type - default via constants - error condition
 --FILE--
 <?php
 
@@ -17,4 +17,4 @@ Fatal error: Uncaught TypeError: Argument 1 passed to int_val() must be of the t
 Stack trace:
 #0 %s(%d): int_val()
 #1 {main}
-  thrown in %s on line %d
\ No newline at end of file
+  thrown in %s on line %d
similarity index 65%
rename from Zend/tests/typehints/scalar_float_with_integer_default_strict.phpt
rename to Zend/tests/type_declarations/scalar_float_with_integer_default_strict.phpt
index b1aab433f935849b87c79c72ce2b62bd372d5950..5e85eba17ca433dbb89ff6707e5e831fa4b40ad6 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Float type hint should allow an integer as default even with strict types
+Float type should allow an integer as default even with strict types
 --FILE--
 <?php
 
similarity index 68%
rename from Zend/tests/typehints/scalar_float_with_integer_default_weak.phpt
rename to Zend/tests/type_declarations/scalar_float_with_integer_default_weak.phpt
index ab3206691a83cf993afe39ce1c0e440047a4e2a9..0289e13ccd46d657791e1936a5dfbeb4b647c9e4 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Float type hint should allow an integer as default
+Float type should allow an integer as default
 --FILE--
 <?php
 
diff --git a/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt b/Zend/tests/type_declarations/scalar_float_with_invalid_default.phpt
new file mode 100644 (file)
index 0000000..7bc2fda
--- /dev/null
@@ -0,0 +1,16 @@
+--TEST--
+Float type should not allow invalid types as default
+--FILE--
+<?php
+
+function test(float $arg = true)
+{
+    var_dump($arg);
+}
+
+test();
+
+?>
+--EXPECTF--
+
+Fatal error: Default value for parameters with a float type can only be float, integer, or NULL in %s on line %d
similarity index 97%
rename from Zend/tests/typehints/scalar_none.phpt
rename to Zend/tests/type_declarations/scalar_none.phpt
index 5a983770228b2a2209b466234a4a2daf6f34e945..3bec609599e6659aa3a3613e1f00199f7fbd7f33 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint missing parameters
+Scalar type missing parameters
 --FILE--
 <?php
 
similarity index 98%
rename from Zend/tests/typehints/scalar_null.phpt
rename to Zend/tests/type_declarations/scalar_null.phpt
index f409e34867428ff0b1b70e67123c3da0d0d7aa4f..6b9930f2977d311b375ec9d6946cd6f89087c15c 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint nullability
+Scalar type nullability
 --FILE--
 <?php
 
similarity index 79%
rename from Zend/tests/typehints/scalar_relative_typehint_disallowed.phpt
rename to Zend/tests/type_declarations/scalar_relative_typehint_disallowed.phpt
index d85091253c0dd9975b78aa290032c951c4ce5f30..b0939837172fbb62ff940bc5971ddfa32e37f621 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint - disallow relative typehints
+Scalar type - disallow relative types
 --FILE--
 <?php
 
similarity index 62%
rename from Zend/tests/typehints/scalar_reserved2.phpt
rename to Zend/tests/type_declarations/scalar_reserved2.phpt
index 01f36fd1543100329de3fcf30a150028a7cb3782..893f4b542a843432e4f14d1826e7223a5063e1c4 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2)
+Scalar type names cannot be used as class, trait or interface names (2)
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved2_class_alias.phpt
rename to Zend/tests/type_declarations/scalar_reserved2_class_alias.phpt
index 02d6bb4a832e8771edb63253403834cf1a3d6aac..777cf9cebe07217d7ee8d2f4b4e4d81078f30534 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2) - class_alias
+Scalar type names cannot be used as class, trait or interface names (2) - class_alias
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved2_use.phpt
rename to Zend/tests/type_declarations/scalar_reserved2_use.phpt
index e61db5c87a8caf818267425662b556333c5ea6f5..3e8d1be88dde79b7aa0886392d4c85794f14fb3e 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (2) - use
+Scalar type names cannot be used as class, trait or interface names (2) - use
 --FILE--
 <?php
 
similarity index 63%
rename from Zend/tests/typehints/scalar_reserved3.phpt
rename to Zend/tests/type_declarations/scalar_reserved3.phpt
index 425365bc65a8298eb64ad30fece864bf6edddbef..433673e71473fca26c42738b3e53100d6cc43fe2 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3)
+Scalar type names cannot be used as class, trait or interface names (3)
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved3_class_alias.phpt
rename to Zend/tests/type_declarations/scalar_reserved3_class_alias.phpt
index 39c2e2a62c16331bd1627488873ef311f965dc48..dc8f319886271f1fe2d6e4745b40d6a53a5aa4f1 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3) - class_alias
+Scalar type names cannot be used as class, trait or interface names (3) - class_alias
 --FILE--
 <?php
 
similarity index 65%
rename from Zend/tests/typehints/scalar_reserved3_use.phpt
rename to Zend/tests/type_declarations/scalar_reserved3_use.phpt
index 23be15e1a3bb630e03ef5e52bf8373f2fb8b8907..af76abf498e34c047447fa4dd307eae36b864810 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (3) - use
+Scalar type names cannot be used as class, trait or interface names (3) - use
 --FILE--
 <?php
 
similarity index 63%
rename from Zend/tests/typehints/scalar_reserved4.phpt
rename to Zend/tests/type_declarations/scalar_reserved4.phpt
index 5a190ce51a9b2f0e06da39b229dd97be82e40950..dd5ff8922e873822e1a8c94f08c5d78670823ce5 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4)
+Scalar type names cannot be used as class, trait or interface names (4)
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved4_class_alias.phpt
rename to Zend/tests/type_declarations/scalar_reserved4_class_alias.phpt
index ffaf934a0125a630472723a6a5d31d98f72e54e4..ebb6ac32015466670000b7f6809c274388744673 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4) - class_alias
+Scalar type names cannot be used as class, trait or interface names (4) - class_alias
 --FILE--
 <?php
 
similarity index 65%
rename from Zend/tests/typehints/scalar_reserved4_use.phpt
rename to Zend/tests/type_declarations/scalar_reserved4_use.phpt
index 05a2ea1069a83a346efd84a2af274d89847b218e..e2fc0aeafed740d15254cbadce4934ce1224ec27 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (4) - use
+Scalar type names cannot be used as class, trait or interface names (4) - use
 --FILE--
 <?php
 
similarity index 62%
rename from Zend/tests/typehints/scalar_reserved6.phpt
rename to Zend/tests/type_declarations/scalar_reserved6.phpt
index 1dee41ff5849d0264def883fce4f19bb86f1cbf1..f84ec94790802a999d1ecc7199f0d0dd836b93f1 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6)
+Scalar type names cannot be used as class, trait or interface names (6)
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved6_class_alias.phpt
rename to Zend/tests/type_declarations/scalar_reserved6_class_alias.phpt
index fd3c328504d61fc08285c62ccfd53a53c4338f83..8a777eca7e7e302a19e958ae57e36db45892a03a 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6) - class_alias
+Scalar type names cannot be used as class, trait or interface names (6) - class_alias
 --FILE--
 <?php
 
similarity index 64%
rename from Zend/tests/typehints/scalar_reserved6_use.phpt
rename to Zend/tests/type_declarations/scalar_reserved6_use.phpt
index 9cb7857a50b7bc03e6d53d5c31359e447bac6d20..e9de61ff87c80e214cd4c1f64f8c6a2a3263b6f9 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (6) - use
+Scalar type names cannot be used as class, trait or interface names (6) - use
 --FILE--
 <?php
 
similarity index 65%
rename from Zend/tests/typehints/scalar_reserved7.phpt
rename to Zend/tests/type_declarations/scalar_reserved7.phpt
index d641d178d16409f9c47676667fbd76490d4e5c69..1e23d59d790b10ca640f06b8a53257ee42506e8a 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint names cannot be used as class, trait or interface names (7)
+Scalar type names cannot be used as class, trait or interface names (7)
 --FILE--
 <?php
 namespace foo;
similarity index 96%
rename from Zend/tests/typehints/scalar_return_basic.phpt
rename to Zend/tests/type_declarations/scalar_return_basic.phpt
index 9395ec97952471e66dc2f91bc4dddbb78eb27a32..4e0650e7e9b67842bf0da0f27414d6356836ffb8 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Return scalar type hint basics
+Return scalar type basics
 --SKIPIF--
 <?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
 --FILE--
@@ -48,7 +48,7 @@ $values = [
 ];
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         echo "*** Trying ";
         var_dump($value);
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
 echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
 *** Trying int(1)
 int(1)
 *** Trying string(1) "1"
@@ -101,7 +101,7 @@ int(0)
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 *** Trying int(1)
 float(1)
 *** Trying string(1) "1"
@@ -139,7 +139,7 @@ float(0)
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 *** Trying int(1)
 string(1) "1"
 *** Trying string(1) "1"
@@ -176,7 +176,7 @@ string(6) "foobar"
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 *** Trying int(1)
 bool(true)
 *** Trying string(1) "1"
similarity index 96%
rename from Zend/tests/typehints/scalar_return_basic_64bit.phpt
rename to Zend/tests/type_declarations/scalar_return_basic_64bit.phpt
index fc7401ed24c9e4e4a9e87175618c086f2c88a15a..e8f69bc6990f21408dcf06e3913f1ce8c9170aaf 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Return scalar type hint basics
+Return scalar type basics
 --SKIPIF--
 <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
 --FILE--
@@ -48,7 +48,7 @@ $values = [
 ];
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         echo "*** Trying ";
         var_dump($value);
@@ -63,7 +63,7 @@ foreach ($functions as $type => $function) {
 echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
 *** Trying int(1)
 int(1)
 *** Trying string(1) "1"
@@ -101,7 +101,7 @@ int(0)
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type integer, resource returned in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 *** Trying int(1)
 float(1)
 *** Trying string(1) "1"
@@ -139,7 +139,7 @@ float(0)
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type float, resource returned in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 *** Trying int(1)
 string(1) "1"
 *** Trying string(1) "1"
@@ -176,7 +176,7 @@ string(6) "foobar"
 *** Trying resource(5) of type (stream)
 *** Caught Return value of {closure}() must be of the type string, resource returned in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 *** Trying int(1)
 bool(true)
 *** Trying string(1) "1"
similarity index 97%
rename from Zend/tests/typehints/scalar_strict.phpt
rename to Zend/tests/type_declarations/scalar_strict.phpt
index 59ec45ac4f8bd9c76766c41a6e7586b89f948bb5..40b036e1d418e098c2ef848e4e43289232e4cd27 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint strict mode
+Scalar type strict mode
 --SKIPIF--
 <?php if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); ?>
 --FILE--
@@ -49,7 +49,7 @@ $values = [
 ];
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         echo PHP_EOL . "*** Trying ";
         var_dump($value);
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
 echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
 
 *** Trying int(1)
 int(1)
@@ -117,7 +117,7 @@ int(2147483647)
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 
 *** Trying int(1)
 float(1)
@@ -170,7 +170,7 @@ float(NAN)
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 
 *** Trying int(1)
 *** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -223,7 +223,7 @@ string(0) ""
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 
 *** Trying int(1)
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
similarity index 97%
rename from Zend/tests/typehints/scalar_strict_64bit.phpt
rename to Zend/tests/type_declarations/scalar_strict_64bit.phpt
index 4671b07609aeb652db22690d334a3575fff39417..3e748ede34f33584b8e4fd71697e989cc691960f 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Scalar type hint strict mode
+Scalar type strict mode
 --SKIPIF--
 <?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
 --FILE--
@@ -49,7 +49,7 @@ $values = [
 ];
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         echo PHP_EOL . "*** Trying ";
         var_dump($value);
@@ -64,7 +64,7 @@ foreach ($functions as $type => $function) {
 echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
 
 *** Trying int(1)
 int(1)
@@ -117,7 +117,7 @@ int(9223372036854775807)
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 
 *** Trying int(1)
 float(1)
@@ -170,7 +170,7 @@ float(NAN)
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 
 *** Trying int(1)
 *** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -223,7 +223,7 @@ string(0) ""
 *** Trying resource(5) of type (stream)
 *** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 
 *** Trying int(1)
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
similarity index 96%
rename from Zend/tests/typehints/scalar_strict_basic.phpt
rename to Zend/tests/type_declarations/scalar_strict_basic.phpt
index 15030e1c862870e57e761fce7353c3f05def63a6..3ee94a2059a2f766310b46c04f4e6512fd827e1e 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Strict scalar type hint basics
+Strict scalar type basics
 --FILE--
 <?php
 
@@ -48,7 +48,7 @@ function type($value) {
 }
 
 foreach ($functions as $type => $function) {
-    echo PHP_EOL, "Testing '$type' typehint:", PHP_EOL;
+    echo PHP_EOL, "Testing '$type' type:", PHP_EOL;
     foreach ($values as $value) {
         $errored = false;
         echo PHP_EOL . "*** Trying ", type($value), " value", PHP_EOL;
@@ -62,7 +62,7 @@ foreach ($functions as $type => $function) {
 echo PHP_EOL . "Done";
 ?>
 --EXPECTF--
-Testing 'int' typehint:
+Testing 'int' type:
 
 *** Trying integer value
 int(1)
@@ -91,7 +91,7 @@ int(1)
 *** Trying resource value
 *** Caught Argument 1 passed to {closure}() must be of the type integer, resource given, called in %s on line %d
 
-Testing 'float' typehint:
+Testing 'float' type:
 
 *** Trying integer value
 float(1)
@@ -120,7 +120,7 @@ float(1)
 *** Trying resource value
 *** Caught Argument 1 passed to {closure}() must be of the type float, resource given, called in %s on line %d
 
-Testing 'string' typehint:
+Testing 'string' type:
 
 *** Trying integer value
 *** Caught Argument 1 passed to {closure}() must be of the type string, integer given, called in %s on line %d
@@ -149,7 +149,7 @@ string(1) "1"
 *** Trying resource value
 *** Caught Argument 1 passed to {closure}() must be of the type string, resource given, called in %s on line %d
 
-Testing 'bool' typehint:
+Testing 'bool' type:
 
 *** Trying integer value
 *** Caught Argument 1 passed to {closure}() must be of the type boolean, integer given, called in %s on line %d
similarity index 76%
rename from Zend/tests/typehints/scalar_weak_reference.phpt
rename to Zend/tests/type_declarations/scalar_weak_reference.phpt
index f397ceaa8d97be4fb3b014fe7a2cff94aecf6b20..74069689e6e6f12f14fc4bc8752b470bc38dd1b4 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Weak scalar type hints, with references
+Weak scalar types, with references
 --FILE--
 <?php
 
@@ -12,7 +12,7 @@ function to_bool(bool &$x) {}
 
 $x = 1.0;
 var_dump($x);
-to_int($x); // because $x is by-reference, the weak type hint converts it
+to_int($x); // because $x is by-reference, the weak type converts it
 var_dump($x);
 to_float($x);
 var_dump($x);
diff --git a/Zend/tests/typehints/scalar_float_with_invalid_default.phpt b/Zend/tests/typehints/scalar_float_with_invalid_default.phpt
deleted file mode 100644 (file)
index 6b67985..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---TEST--
-Float type hint should not allow invalid types as default
---FILE--
-<?php
-
-function test(float $arg = true)
-{
-    var_dump($arg);
-}
-
-test();
-
-?>
---EXPECTF--
-
-Fatal error: Default value for parameters with a float type hint can only be float, integer, or NULL in %s on line %d
index 26842bbcc2f588e6d0c5a84aedbc6818a41ecc87..153161a09df031d7cf4bedf725cbc3e1b5be2096 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Variadic arguments enforce typehints
+Variadic arguments enforce types
 --FILE--
 <?php
 
index 24109e08917b561d83a96088d494c2ecec90f0b7..ef217b2be0c298aaa6098d8845819267535ef82e 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Error suppression for typehints on variadic arguments works
+Error suppression for types on variadic arguments works
 --FILE--
 <?php
 
index f65f2ed7b18911284ebe5e62a722244373236e2b..d3e17d0ec4b12ceb3a60e4ef435584d6831a88ac 100644 (file)
@@ -4416,7 +4416,7 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
        zend_arg_info *arg_infos;
        
        if (return_type_ast) {
-               /* Use op_array->arg_info[-1] for return type hinting */
+               /* Use op_array->arg_info[-1] for return type */
                arg_infos = safe_emalloc(sizeof(zend_arg_info), list->children + 1, 0);
                arg_infos->name = NULL;
                arg_infos->pass_by_reference = (op_array->fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0;
@@ -4525,31 +4525,31 @@ void zend_compile_params(zend_ast *ast, zend_ast *return_type_ast) /* {{{ */
                                                && !Z_CONSTANT(default_node.u.constant)
                                        ) {
                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
-                                                       "with array type hint can only be an array or NULL");
+                                                       "with array type can only be an array or NULL");
                                        }
                                } else if (arg_info->type_hint == IS_CALLABLE && default_ast) {
                                        if (!has_null_default && !Z_CONSTANT(default_node.u.constant)) {
                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
-                                                       "with callable type hint can only be NULL");
+                                                       "with callable type can only be NULL");
                                        }
                                }
                        } else {
                                if (default_ast && !has_null_default && !Z_CONSTANT(default_node.u.constant)) {
                                        if (arg_info->class_name) {
                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
-                                                       "with a class type hint can only be NULL");
+                                                       "with a class type can only be NULL");
                                        } else switch (arg_info->type_hint) {
                                                case IS_DOUBLE:
                                                        if (Z_TYPE(default_node.u.constant) != IS_DOUBLE && Z_TYPE(default_node.u.constant) != IS_LONG) {
                                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
-                                                                       "with a float type hint can only be float, integer, or NULL");
+                                                                       "with a float type can only be float, integer, or NULL");
                                                        }
                                                        break;
                                                        
                                                default:
                                                        if (!ZEND_SAME_FAKE_TYPE(arg_info->type_hint, Z_TYPE(default_node.u.constant))) {
                                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
-                                                                       "with a %s type hint can only be %s or NULL",
+                                                                       "with a %s type can only be %s or NULL",
                                                                        zend_get_type_by_const(arg_info->type_hint), zend_get_type_by_const(arg_info->type_hint));
                                                        }
                                                        break;
index b777a0ba8c26672846940e7abf3c4cd9eaa0644b..992d75ca3e0c2661cb562e3e926791bdc6eb9181 100644 (file)
@@ -261,7 +261,7 @@ typedef struct _zend_try_catch_element {
 /* class has magic methods __get/__set/__unset/__isset that use guards */
 #define ZEND_ACC_USE_GUARDS                            0x1000000
 
-/* function has arguments with type hinting */
+/* function has typed arguments */
 #define ZEND_ACC_HAS_TYPE_HINTS                        0x10000000
 
 /* op_array has finally blocks */
@@ -270,7 +270,7 @@ typedef struct _zend_try_catch_element {
 /* internal function is allocated at arena */
 #define ZEND_ACC_ARENA_ALLOCATED               0x20000000
 
-/* Function has a return type hint (or class has such non-private function) */
+/* Function has a return type (or class has such non-private function) */
 #define ZEND_ACC_HAS_RETURN_TYPE               0x40000000
 
 /* op_array uses strict mode types */
@@ -319,7 +319,7 @@ typedef struct _zend_arg_info {
 /* the following structure repeats the layout of zend_internal_arg_info,
  * but its fields have different meaning. It's used as the first element of
  * arg_info array to define properties of internal functions.
- * It's also used for return type hinting.
+ * It's also used for the return type.
  */
 typedef struct _zend_internal_function_info {
        zend_uintptr_t required_num_args;
index 73b67f52169bc46e1b6a28e6bb5d458a2460c050..6f897ab3cd8e894194200975614f1e644e77cf3e 100644 (file)
@@ -170,7 +170,7 @@ char *zend_visibility_string(uint32_t fn_flags) /* {{{ */
 static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_info *fe_arg_info, const zend_function *proto, zend_arg_info *proto_arg_info) /* {{{ */
 {
        if (ZEND_LOG_XOR(fe_arg_info->class_name, proto_arg_info->class_name)) {
-               /* Only one has a type hint and the other one doesn't */
+               /* Only one has a type declaration and the other one doesn't */
                return 0;
        }
 
@@ -239,7 +239,7 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
        }
 
        if (fe_arg_info->type_hint != proto_arg_info->type_hint) {
-               /* Incompatible type hint */
+               /* Incompatible type */
                return 0;
        }
 
index 0ef3e3516bdd56c329c2b3d9afae3010371f5852..2b536d0185f10b55d0fa0e639da6ad13ab2ae05f 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-ZE2 type hinting
+ZE2 type
 --SKIPIF--
 <?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
 --FILE--
@@ -11,4 +11,4 @@ class T {
 ?>
 --EXPECTF--
 
-Fatal error: Default value for parameters with a class type hint can only be NULL in %stype_hints_003.php on line 3
+Fatal error: Default value for parameters with a class type can only be NULL in %stype_hints_003.php on line 3