3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StreamWrapper { public function stream_open( string $path, string $mode, int $options, ?string &$opened_path = null ): bool { var_dump(__METHOD__, func_get_args()); return true; } public function stream_write(string $data) { var_dump(__METHOD__, func_get_args()); return strlen($data); } public function stream_close(): void { var_dump(__METHOD__); } } stream_wrapper_register('test', StreamWrapper::class); $fp = fopen('test://foo', 'w'); fwrite($fp, str_repeat('a', 9 * 1024)); fclose($fp);

Abusive script

This script was stopped while abusing our resources


preferences:
26.69 ms | 409 KiB | 5 Q