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 constant self::INVALID in %s:%d 14Stack trace: 15#0 %s(%d): [constant expression]() 16#1 %s(%d): file_get_contents('error://test') 17#2 {main} 18 thrown in %sbug77664.php on line %d 19