xref: /php-src/Zend/tests/gh15907.phpt (revision 15a0c3a9)
1--TEST--
2GH-15907: Failed assertion when promoting inheritance error to exception
3--FILE--
4<?php
5
6set_error_handler(function($errno, $msg) {
7    throw new Exception($msg);
8});
9
10class C implements Serializable {
11    public function serialize() {}
12    public function unserialize($serialized) {}
13}
14
15?>
16--EXPECTF--
17Fatal error: During inheritance of C, while implementing Serializable: Uncaught Exception: C implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s:%d
18%a
19