3v4l.org

run code in 500+ PHP versions simultaneously
<?php $res = fopen(__FILE__, "r"); for ($i=0; $i<10; $i++) { var_dump($res = fopen("php://fd/$i", "r"), stream_get_meta_data($res)); }
Output for rfc.property-hooks
resource(6) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/0" } resource(7) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/1" } resource(8) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/2" } resource(9) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/3" } resource(10) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/4" } resource(11) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/5" } Warning: fopen(php://fd/6): Failed to open stream: Error duping file descriptor 6; possibly it doesn't exist: [9]: Bad file descriptor in /in/V5REt on line 6 Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, false given in /in/V5REt:6 Stack trace: #0 /in/V5REt(6): stream_get_meta_data(false) #1 {main} thrown in /in/V5REt on line 6
Process exited with code 255.
Output for git.master
resource(6) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/0" } resource(7) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/1" } resource(8) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/2" } resource(9) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/3" } resource(10) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/4" } resource(11) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/5" } Warning: fopen(php://fd/6): Failed to open stream: Error duping file descriptor 6; possibly it doesn't exist: [9]: Bad file descriptor in /in/V5REt on line 6 Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, bool given in /in/V5REt:6 Stack trace: #0 /in/V5REt(6): stream_get_meta_data(false) #1 {main} thrown in /in/V5REt on line 6
Process exited with code 255.
Output for git.master_jit
resource(6) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/0" } resource(7) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/1" } resource(8) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(false) ["uri"]=> string(10) "php://fd/2" } resource(9) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/3" } resource(10) of type (stream) array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(3) "PHP" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(1) "r" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(10) "php://fd/4" } Warning: fopen(php://fd/5): Failed to open stream: Error duping file descriptor 5; possibly it doesn't exist: [9]: Bad file descriptor in /in/V5REt on line 6 Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, bool given in /in/V5REt:6 Stack trace: #0 /in/V5REt(6): stream_get_meta_data(false) #1 {main} thrown in /in/V5REt 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:
102.41 ms | 2365 KiB | 4 Q