3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyFilter extends php_user_filter { public function filter($in, $out, &$consumed, $closing) { stream_bucket_make_writeable($in); return PSFS_ERR_FATAL; } } stream_filter_register('filtername', MyFilter::class); $source_resource = fopen('php://memory', 'rb+'); fwrite($source_resource, 'Test data'); rewind($source_resource); stream_filter_prepend($source_resource,'filtername',STREAM_FILTER_READ); var_dump(stream_copy_to_stream($source_resource, fopen('php://memory', 'wb')));
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Return type of MyFilter::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/dD9ZH on line 4 bool(false)

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:
28.34 ms | 406 KiB | 5 Q