forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgh13680.phpt
25 lines (24 loc) · 891 Bytes
/
gh13680.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--TEST--
GH-13680 (Segfault with session_decode and compilation error)
--EXTENSIONS--
session
--SKIPIF--
<?php include('skipif.inc'); ?>
--INI--
session.use_cookies=0
session.use_strict_mode=0
session.cache_limiter=
session.serialize_handler=php_serialize
session.save_handler=files
error_reporting=E_ALL
--FILE--
<?php
session_start();
session_decode('foo');
class Test extends DateTime {
public static function createFromFormat($format, $datetime, $timezone = null): Wrong {}
}
?>
--EXPECTF--
Warning: session_decode(): Failed to decode session object. Session has been destroyed in %s on line %d
Fatal error: Could not check compatibility between Test::createFromFormat($format, $datetime, $timezone = null): Wrong and DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false, because class Wrong is not available in %s on line %d