1--TEST--
2BUG #77664 (Segmentation fault when using undefined constant in custom wrapper)
3--FILE--
4<?php
5class ErrorWrapper {
6	public $context;
7	public $var = self::INVALID;
8}
9stream_wrapper_register('error',ErrorWrapper::class);
10file_get_contents('error://test');
11?>
12--EXPECTF--
13Fatal error: Uncaught Error: Undefined class constant 'self::INVALID' in %sbug77664.php:%d
14Stack trace:
15#0 %sbug77664.php(%d): file_get_contents('error://test')
16#1 {main}
17  thrown in %sbug77664.php on line %d
18