- var_dump: documentation ( source)
- str_repeat: documentation ( source)
- stream_wrapper_register: documentation ( source)
- fclose: documentation ( source)
- fwrite: documentation ( source)
- fopen: documentation ( source)
<?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);
This script was stopped while abusing our resources