3v4l.org

run code in 300+ PHP versions simultaneously
<?php class strtoupper_filter extends php_user_filter { function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket->data = strtoupper($bucket->data); $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register("strtoupper", "strtoupper_filter") or die("Failed to register filter"); define('FD', fopen('/dev/null','rw')); stream_filter_append(FD, "strtoupper");
Output for git.master, git.master_jit
Deprecated: Return type of strtoupper_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/4iYJC on line 4 Warning: fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/tmp:/in:/etc) in /in/4iYJC on line 18 Warning: fopen(/dev/null): Failed to open stream: Operation not permitted in /in/4iYJC on line 18 Fatal error: Uncaught TypeError: stream_filter_append(): Argument #1 ($stream) must be of type resource, bool given in /in/4iYJC:19 Stack trace: #0 /in/4iYJC(19): stream_filter_append(false, 'strtoupper') #1 {main} thrown in /in/4iYJC on line 19
Process exited with code 255.
Output for rfc.property-hooks
Deprecated: Return type of strtoupper_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/4iYJC on line 4 Warning: fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/tmp:/in:/etc) in /in/4iYJC on line 18 Warning: fopen(/dev/null): Failed to open stream: Operation not permitted in /in/4iYJC on line 18 Fatal error: Uncaught TypeError: stream_filter_append(): Argument #1 ($stream) must be of type resource, false given in /in/4iYJC:19 Stack trace: #0 /in/4iYJC(19): stream_filter_append(false, 'strtoupper') #1 {main} thrown in /in/4iYJC on line 19
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:
49.16 ms | 401 KiB | 8 Q