3v4l.org

run code in 300+ PHP versions simultaneously
<?php class user_filter extends php_user_filter { function filter($in, $out, &$consumed, $closing) { while($bucket = stream_bucket_make_writeable($in)) { } fclose($this->stream); } } stream_filter_register('user_filter','user_filter'); $fd = fopen('php://memory','w+'); $filter = stream_filter_append($fd, 'user_filter'); echo fwrite($fd, "foo"); echo fread($fd, 3);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of user_filter::filter($in, $out, &$consumed, $closing) should either be compatible with php_user_filter::filter($in, $out, &$consumed, bool $closing): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/DZK9D on line 3 Warning: fclose(): 5 is not a valid stream resource in /in/DZK9D on line 6 Warning: fclose(): 5 is not a valid stream resource in /in/DZK9D on line 6 Fatal error: Uncaught TypeError: fclose(): supplied resource is not a valid stream resource in /in/DZK9D:6 Stack trace: #0 /in/DZK9D(6): fclose(Resource id #5) #1 [internal function]: user_filter->filter(Resource id #12, Resource id #13, 0, true) #2 {main} thrown in /in/DZK9D on line 6
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.84 ms | 402 KiB | 8 Q