]> granicus.if.org Git - php/commitdiff
Merge branch 'master' into throwable-interface
authorAaron Piotrowski <aaron@trowski.com>
Sun, 14 Jun 2015 23:53:11 +0000 (18:53 -0500)
committerAaron Piotrowski <aaron@trowski.com>
Sun, 14 Jun 2015 23:53:11 +0000 (18:53 -0500)
# Conflicts:
# Zend/zend_language_scanner.c
# Zend/zend_language_scanner.l
# ext/simplexml/tests/SimpleXMLElement_xpath.phpt

29 files changed:
1  2 
UPGRADING
Zend/tests/array_type_hint_001.phpt
Zend/tests/bug39003.phpt
Zend/tests/bug42802.phpt
Zend/tests/bug43332_1.phpt
Zend/tests/bug68446.phpt
Zend/tests/closure_027.phpt
Zend/tests/ns_071.phpt
Zend/tests/ns_072.phpt
Zend/tests/objects_022.phpt
Zend/tests/return_types/028.phpt
Zend/tests/typehints/explicit_weak_include_strict.phpt
Zend/tests/typehints/strict_call_weak.phpt
Zend/tests/typehints/strict_call_weak_explicit.phpt
Zend/tests/typehints/weak_include_strict.phpt
Zend/tests/variadic/typehint_error.phpt
Zend/zend.c
Zend/zend_exceptions.c
Zend/zend_language_scanner.c
Zend/zend_language_scanner.l
ext/spl/tests/bug69737.phpt
ext/tokenizer/tests/token_get_all_TOKEN_PARSE_000.phpt
tests/classes/autoload_009.phpt
tests/classes/type_hinting_001.phpt
tests/classes/type_hinting_002.phpt
tests/classes/type_hinting_003.phpt
tests/lang/bug24658.phpt
tests/lang/catchable_error_001.phpt
tests/lang/type_hints_001.phpt

diff --cc UPGRADING
Simple merge
index 474ffa8e59e0a512b15ceee574394d3c887760a3,bad724679a91d66e2132c389e3ac764b1b71e542..2b473c56b4747b1aa6a37a0ef0496e02c1f8e51a
@@@ -12,8 -12,8 +12,8 @@@ foo(123)
  --EXPECTF--
  3
  
 -Fatal error: Uncaught TypeException: 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 %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php:2
  Stack trace:
- #0 %s(%d): foo()
+ #0 %s(%d): foo(123)
  #1 {main}
    thrown in %sarray_type_hint_001.php on line 2
index f4f9e4d9b6531f7c979c5fe0038f34b69eb022f1,87cce6fb351c9a4a10b020cf5cfb0d491e1c7a6c..add14512c80869fded53a8556dc0df0d57b86c8b
@@@ -21,8 -21,8 +21,8 @@@ test($obj)
  echo "Done\n";
  ?>
  --EXPECTF--   
 -Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of OtherClassName, instance of ClassName given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): test()
+ #0 %s(%d): test(Object(ClassName))
  #1 {main}
    thrown in %s on line %d
index 6dad5feccb7da2d9d628cac2b175001e44411fae,9b7482f727d30e2e4b59e0977e37995a8424d5a0..3b00408e01627d02539e008553caa50652a12218
@@@ -37,8 -37,8 +37,8 @@@ o
  ok
  ok
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to foo\test5() must be an instance of bar, instance of foo\bar given, called in %sbug42802.php on line %d and defined in %sbug42802.php:%d
  Stack trace:
- #0 %s(%d): foo\test5()
+ #0 %s(%d): foo\test5(Object(foo\bar))
  #1 {main}
    thrown in %sbug42802.php on line %d
index 5fe734cfea970f2060a83fc74cb1cbb9947ecac2,ce4ce52833d9132af78518620c9b78d3fb4f695c..fc035ab2b6b6e62a53d4dcbf11b2854fa32822af
@@@ -12,8 -12,8 +12,8 @@@ $foo = new foo
  $foo->bar($foo); // Ok!
  $foo->bar(new \stdclass); // Error, ok!
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to foobar\foo::bar() must be an instance of foobar\foo, instance of stdClass given, called in %sbug43332_1.php on line 10 and defined in %sbug43332_1.php:5
  Stack trace:
- #0 %s(%d): foobar\foo->bar()
+ #0 %s(%d): foobar\foo->bar(Object(stdClass))
  #1 {main}
    thrown in %sbug43332_1.php on line 5
index 2dad15d411e5a720e84bc84a3a495a2743a9d0b0,a9507b89da57072c11bb5466b364abd55d398282..994699e5defae1fd512304865f8b1ddc4d8834b7
@@@ -32,9 -32,9 +32,9 @@@ array(1) 
    int(1)
  }
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to a() must be of the type array, null given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): a()
+ #0 %s(%d): a(NULL)
  #1 {main}
    thrown in %s on line %d
  
index a56b78013ce052eda3dbd2c9be9b477fb708c886,0b604c3ac473d8759b97221f2d54112f165a9883..db42ae9307e116ee63cc2893c48464836042c8af
@@@ -28,8 -28,8 +28,8 @@@ Notice: Undefined variable: y in %s on 
  Warning: Missing argument 1 for {closure}(), called in %s on line %d and defined in %s on line %d
  NULL
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to test() must be an instance of Closure, instance of stdClass given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): test()
+ #0 %s(%d): test(Object(stdClass))
  #1 {main}
    thrown in %s on line %d
index 53ff7f018a529de941d4240fd1a65ebf6180f285,7dbca07b8d2191659d34668903f83821a6bd2cee..2f2fcfad1a3fe80c25cec14069edc896d81f5781
@@@ -18,8 -18,8 +18,8 @@@ new bar(new \stdclass)
  --EXPECTF--
  NULL
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must be of the type array, object given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): foo\bar->__construct()
+ #0 %s(%d): foo\bar->__construct(Object(stdClass))
  #1 {main}
    thrown in %s on line %d
index 877095df4a63e3653efdc07f31853b40027103dc,c797cf0fac2e5093f1e595ca7977711e961f11f7..6375682890240a956eb3a3519a620139ea831319
@@@ -30,8 -30,8 +30,8 @@@ object(foo\test)#%d (0) 
  }
  NULL
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to foo\bar::__construct() must implement interface foo\foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): foo\bar->__construct()
+ #0 %s(%d): foo\bar->__construct(Object(stdClass))
  #1 {main}
    thrown in %s on line %d
index 913de7d990733316dfd58777985155a0b43d1011,982b2d1a6272086305aebf8f69ebfffef8fe42be..01f961bae1f30f0410c1fd61de46ab1b01ddb56d
@@@ -36,8 -36,8 +36,8 @@@ object(bar)#%d (0) 
  object(baz)#%d (0) {
  }
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to foo::testFoo() must be an instance of foo, instance of stdClass given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): foo->testFoo()
+ #0 %s(%d): foo->testFoo(Object(stdClass))
  #1 {main}
    thrown in %s on line %d
index 0000000000000000000000000000000000000000,d820b25b0e507ec7d18ad37edc099362e6843221..d2a78ede4abe45d53d4ead60f3889aa95c52453c
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,20 +1,20 @@@
 -} catch (BaseException $e) {
+ --TEST--
+ Memory leak when returning TMP/VAR with wrong return type
+ --FILE--
+ <?php
+ function foo(): stdClass {
+       $a = new stdClass;
+       $b = [];
+       return [$a, $b];
+ }
+ try {
+       foo();
++} catch (Error $e) {
+       print $e->getMessage();
+ }
+ ?>
+ --EXPECTF--
+ Return value of foo() must be an instance of stdClass, array returned in %s on line %d
index 1593c709507bcfc5368d54bcd7d94030f442d5d9,579ebcb3c0de5c44b47f7629e254437234b56310..fb53d8ce117db727d5807ca69b11c9a128bfcf45
@@@ -11,9 -11,9 +11,9 @@@ require 'weak_include_strict_2.inc'
  // calls within that file should stay strict, despite being included by weak file
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
  Stack trace:
- #0 %s(%d): takes_int()
+ #0 %s(%d): takes_int(1)
  #1 %s(%d): require('%s')
  #2 {main}
    thrown in %sweak_include_strict_2.inc on line 5
index 8ebed2216b336a728bfab8b5f75597d5c18406d3,5031644a7f15a1b43252b8ddcc729693f1f9df30..e3a606ec1252b7a61831834ebd8e9b965a20a639
@@@ -13,9 -13,9 +13,9 @@@ require 'strict_call_weak_2.inc'
  function_declared_in_weak_mode(1.0);
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak.php on line 10 and defined in %sstrict_call_weak_2.inc:5
  Stack trace:
- #0 %s(%d): function_declared_in_weak_mode()
+ #0 %s(%d): function_declared_in_weak_mode(1)
  #1 {main}
    thrown in %sstrict_call_weak_2.inc on line 5
  
index 215a0b1fcbe113b93ff2fd645a42d887f65cd886,37f527bb0b0f40ad49bcaaefb6ace2ae605c10d6..22c5b4319c86a6e91da93275b76484b85eb8970d
@@@ -13,9 -13,9 +13,9 @@@ require 'strict_call_weak_explicit_2.in
  function_declared_in_weak_mode(1.0);
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to function_declared_in_weak_mode() must be of the type integer, float given, called in %sstrict_call_weak_explicit.php on line 10 and defined in %sstrict_call_weak_explicit_2.inc:5
  Stack trace:
- #0 %s(%d): function_declared_in_weak_mode()
+ #0 %s(%d): function_declared_in_weak_mode(1)
  #1 {main}
    thrown in %sstrict_call_weak_explicit_2.inc on line 5
  
index 5cd1895d66a51b72dec49656f74a8c0ab2146398,da7c7a4d13cf1d2a8032765baca751277e1128b9..e49485dbe5e4d43eabeef100264684da586357f0
@@@ -11,9 -11,9 +11,9 @@@ require 'weak_include_strict_2.inc'
  // calls within that file should stay strict, despite being included by weak file
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to takes_int() must be of the type integer, float given, called in %sweak_include_strict_2.inc on line 9 and defined in %sweak_include_strict_2.inc:5
  Stack trace:
- #0 %s(%d): takes_int()
+ #0 %s(%d): takes_int(1)
  #1 %s(%d): require('%s')
  #2 {main}
    thrown in %sweak_include_strict_2.inc on line 5
index 9f9a97bc569ee037246eff17d12bf8b52fbce7c0,2cbe2f32a201c299926a954e116e0704bf81ab03..26842bbcc2f588e6d0c5a84aedbc6818a41ecc87
@@@ -33,8 -33,8 +33,8 @@@ array(3) 
    }
  }
  
 -Fatal error: Uncaught TypeException: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d
 +Fatal error: Uncaught TypeError: Argument 3 passed to test() must be of the type array, integer given, called in %s:%d
  Stack trace:
- #0 %s(%d): test(Array, Array)
+ #0 %s(%d): test(Array, Array, 2)
  #1 {main}
    thrown in %s on line %d
diff --cc Zend/zend.c
Simple merge
index 422c4bb5fd9b8c056b4db20fe77498f22c97c611,e8c0706cf0a9e235c2b37a8e0eb0a5fe42168e4d..ae55c1fceaebf621062809f76d4d6813675dfcfc
@@@ -38,11 -39,6 +38,11 @@@ static zend_class_entry *type_error_ce
  static zend_object_handlers default_exception_handlers;
  ZEND_API void (*zend_throw_exception_hook)(zval *ex);
  
- static zend_class_entry *zend_get_exception_base(zval *object)
++static inline zend_class_entry *zend_get_exception_base(zval *object)
 +{
 +      return instanceof_function(Z_OBJCE_P(object), default_exception_ce) ? default_exception_ce : error_ce;
 +}
 +
  void zend_exception_set_previous(zend_object *exception, zend_object *add_previous)
  {
      zval tmp, *previous, zv, *pzv, rv;
@@@ -569,11 -556,8 +569,11 @@@ ZEND_METHOD(exception, getTraceAsString
        uint32_t num = 0;
  
        DEFAULT_0_PARAMS;
 +      
 +      object = getThis();
 +      base_ce = zend_get_exception_base(object);
  
-       trace = zend_read_property(base_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv);
 -      trace = zend_read_property(base_exception_ce, getThis(), "trace", sizeof("trace")-1, 1, &rv);
++      trace = zend_read_property(base_ce, object, "trace", sizeof("trace")-1, 1, &rv);
        if (Z_TYPE_P(trace) != IS_ARRAY) {
                RETURN_FALSE;
        }
index e3b2de1a795c7ac046128bd179440cbcabd3cc5f,63d19483ba64dc2cb5637bd2a05ecef949d83d35..6813cf4db286213df7619de51bc07e6774631ed8
@@@ -2720,8 -2743,8 +2743,8 @@@ yy136
                 * Because the lexing itself doesn't do that for us
                 */
                if (end != yytext + yyleng) {
 -                      zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
 +                      zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
-                       return T_ERROR;
+                       RETURN_TOKEN(T_ERROR);
                }
        } else {
                errno = 0;
                        }
                        /* Also not an assert for the same reason */
                        if (end != yytext + yyleng) {
 -                              zend_throw_exception(zend_get_parse_exception(),
 +                              zend_throw_exception(zend_get_parse_error(),
                                        "Invalid numeric literal", E_PARSE);
-                               return T_ERROR;
+                               RETURN_TOKEN(T_ERROR);
                        }
                        ZEND_ASSERT(!errno);
-                       return T_DNUMBER;
+                       RETURN_TOKEN(T_DNUMBER);
                }
                /* Also not an assert for the same reason */
                if (end != yytext + yyleng) {
 -                      zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
 +                      zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
-                       return T_ERROR;
+                       RETURN_TOKEN(T_ERROR);
                }
        }
        ZEND_ASSERT(!errno);
index 1204287ad93f1056f55dbb917a2e8fdec0af5989,cde0621df0e6cff2505750f263af6f70d8f5a2b0..01c489cbe4ae42257affcd8330d40ec33d0234a9
@@@ -1635,8 -1658,8 +1658,8 @@@ NEWLINE ("\r"|"\n"|"\r\n"
                 * Because the lexing itself doesn't do that for us
                 */
                if (end != yytext + yyleng) {
 -                      zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
 +                      zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
-                       return T_ERROR;
+                       RETURN_TOKEN(T_ERROR);
                }
        } else {
                errno = 0;
                        }
                        /* Also not an assert for the same reason */
                        if (end != yytext + yyleng) {
 -                              zend_throw_exception(zend_get_parse_exception(),
 +                              zend_throw_exception(zend_get_parse_error(),
                                        "Invalid numeric literal", E_PARSE);
-                               return T_ERROR;
+                               RETURN_TOKEN(T_ERROR);
                        }
                        ZEND_ASSERT(!errno);
-                       return T_DNUMBER;
+                       RETURN_TOKEN(T_DNUMBER);
                }
                /* Also not an assert for the same reason */
                if (end != yytext + yyleng) {
 -                      zend_throw_exception(zend_get_parse_exception(), "Invalid numeric literal", E_PARSE);
 +                      zend_throw_exception(zend_get_parse_error(), "Invalid numeric literal", E_PARSE);
-                       return T_ERROR;
+                       RETURN_TOKEN(T_ERROR);
                }
        }
        ZEND_ASSERT(!errno);
index 0000000000000000000000000000000000000000,fd8bba650856ef30f4c7b0184cbbcd48f5bdd16d..02815c296a665152425694ad13213f140897d8de
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,21 +1,21 @@@
 -Fatal error: Uncaught EngineException: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d
+ --TEST--
+ Bug #69737 (Segfault when SplMinHeap::compare produces fatal error)
+ --FILE--
+ <?php
+ class SplMinHeap1 extends SplMinHeap {
+   public function compare($a, $b) {
+     return -parent::notexist($a, $b);
+   }
+ }
+ $h = new SplMinHeap1();
+ $h->insert(1);
+ $h->insert(6);
+ ?>
+ ===DONE===
+ --EXPECTF--
++Fatal error: Uncaught Error: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d
+ Stack trace:
+ #0 [internal function]: SplMinHeap1->compare(1, 6)
+ #1 %s%ebug69737.php(%d): SplHeap->insert(6)
+ #2 {main}
+   thrown in %s%ebug69737.php on line %d
index 0000000000000000000000000000000000000000,03b991b1a5db735e7e9e684c619fd2fcde5315f0..b9da91502a687f6b550ff2e36621e2ce1766a511
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,19 +1,19 @@@
 -} catch (ParseException $e) {
+ --TEST--
+ Parse errors during token_get_all() with TOKEN_PARSE flag
+ --SKIPIF--
+ <?php if (!extension_loaded("tokenizer")) print "skip"; ?>
+ --FILE--
+ <?php
+ try {
+     token_get_all('<?php invalid code;', TOKEN_PARSE);
++} catch (ParseError $e) {
+     echo $e->getMessage(), PHP_EOL;
+ }
+ echo "Done";
+ ?>
+ --EXPECT--
+ syntax error, unexpected 'code' (T_STRING)
+ Done
index 51d3e8f7910e97e7ca40a024335cfce052000d65,b25d7eb69de4b682ae1fd4a16577466b63474542..150f3ec20197f667502ac9148f60af6d8e5bb818
@@@ -14,8 -14,8 +14,8 @@@ Ensure type hints for unknown types do 
    f(new stdClass);
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to f() must be an instance of UndefClass, instance of stdClass given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): f()
+ #0 %s(%d): f(Object(stdClass))
  #1 {main}
    thrown in %s on line %d
index d9412293e9c481ad42577b822e99e411c4245c47,da3de4611f3de419676f49a47d2984a422330a4c..28d1280b794480cbae5d85af73c738a4965c087f
@@@ -35,8 -35,8 +35,8 @@@ $a->b($b)
  ?>
  --EXPECTF--
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12
 +Fatal error: Uncaught TypeError: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s:12
  Stack trace:
- #0 %s(%d): FooBar->a()
+ #0 %s(%d): FooBar->a(Object(Blort))
  #1 {main}
    thrown in %s on line 12
index 7486824d50ca5a50dfb2cca4e7c0101e1b1c1c01,1988e24d977b831273394ffe6075b61c3b680d2b..6fefcc8dd460ac2803ad7e95eeffe8d0bd5b9bf0
@@@ -13,8 -13,8 +13,8 @@@ $o = new Foo
  $o->a($o);
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to Foo::a() must be an instance of NonExisting, instance of Foo given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): Foo->a()
+ #0 %s(%d): Foo->a(Object(Foo))
  #1 {main}
    thrown in %s on line %d
index 6038f25a50543a67fc81e5f28456398a4018adf3,a58c579dc52dc25d44ccb3b4095c88960f635247..50de31e44b6b7492b02e70773d4954583ee03f78
@@@ -57,8 -57,8 +57,8 @@@ array(1) 
    int(25)
  }
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to Test::f1() must be of the type array, integer given, called in %s on line %d and defined in %s:%d
  Stack trace:
- #0 %s(%d): Test::f1()
+ #0 %s(%d): Test::f1(1)
  #1 {main}
    thrown in %s on line %d
index 6229d52a648491e70749d3192d3ba52bd2884a93,6e57d9b66b921aca1ea4f1622c4de1c57a01183b..b089569d9118b3e093047d74ae5096121f85c506
@@@ -53,9 -53,9 +53,9 @@@ int(2
  object(foo)#%d (0) {
  }
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d
 +Fatal error: Uncaught TypeError: Argument 1 passed to typehint() must be an instance of foo, integer given in %s:%d
  Stack trace:
- #0 [internal function]: typehint(1)
+ #0 [internal function]: typehint(1, 1)
  #1 %s(%d): array_walk(Array, 'typehint')
  #2 {main}
    thrown in %s on line %d
index e63e0d7ccc446ed64ce2d3b861841454fb54c9ab,4343ac0e8f81ec2388a516d0ecc5a0b08ec3677f..b11a7c8d96ea00bb2635feac3e446b7c215b2596
@@@ -19,8 -19,8 +19,8 @@@ Catchable fatal error [1
        echo "ALIVE!\n";
  ?>
  --EXPECTF--
 -Fatal error: Uncaught TypeException: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
 +Fatal error: Uncaught TypeError: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php:5
  Stack trace:
- #0 %s(%d): blah()
+ #0 %s(%d): blah(Object(stdClass))
  #1 {main}
    thrown in %scatchable_error_001.php on line 5
index d487a86a791da7ec8b2cb1b04985f2ab968efb6e,0a061b7d9eabdac1c98b74c303323a42f3f29fcb..e8a2ffa9e344a53d6967ce46e5638de2e992607f
@@@ -23,8 -23,8 +23,8 @@@ type_hint_foo($bar)
  ?>
  --EXPECTF--
  
 -Fatal error: Uncaught TypeException: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9
 +Fatal error: Uncaught TypeError: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s:9
  Stack trace:
- #0 %s(%d): type_hint_foo()
+ #0 %s(%d): type_hint_foo(Object(Bar))
  #1 {main}
    thrown in %s on line 9