- file_get_contents: documentation ( source)
- stream_wrapper_register: documentation ( source)
<?php
class ErrorWrapper {
public $context;
public $var = self::INVALID;
}
stream_wrapper_register('error',ErrorWrapper::class);
file_get_contents('error://test');