3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = fopen('php://memory', "a"); var_dump(stream_get_meta_data($s['stream_type']));
Output for 8.3.0 - 8.3.4
Warning: Trying to access array offset on resource in /in/4ToIP on line 4 Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, null given in /in/4ToIP:4 Stack trace: #0 /in/4ToIP(4): stream_get_meta_data(NULL) #1 {main} thrown in /in/4ToIP on line 4
Process exited with code 255.
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17
Warning: Trying to access array offset on value of type resource in /in/4ToIP on line 4 Fatal error: Uncaught TypeError: stream_get_meta_data(): Argument #1 ($stream) must be of type resource, null given in /in/4ToIP:4 Stack trace: #0 /in/4ToIP(4): stream_get_meta_data(NULL) #1 {main} thrown in /in/4ToIP on line 4
Process exited with code 255.
Output for 7.4.0 - 7.4.33
Notice: Trying to access array offset on value of type resource in /in/4ToIP on line 4 Warning: stream_get_meta_data() expects parameter 1 to be resource, null given in /in/4ToIP on line 4 NULL
Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.6 - 7.2.33, 7.3.16 - 7.3.33
Warning: stream_get_meta_data() expects parameter 1 to be resource, null given in /in/4ToIP on line 4 NULL
Output for 5.1.4 - 5.1.6, 5.2.0 - 5.2.17
Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 bool(false)
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.3
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/4ToIP on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 bool(false)
Output for 4.3.5 - 4.3.11, 4.4.0 - 4.4.9
Warning: fopen(php://memory): failed to open stream: Success in /in/4ToIP on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 bool(false)
Output for 4.3.3 - 4.3.4
Warning: fopen(php://memory): failed to open stream: Success in /in/4ToIP on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 NULL
Output for 4.3.2
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/4ToIP on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 NULL
Output for 4.3.0 - 4.3.1
Warning: fopen(php://memory) [http://www.php.net/function.fopen]: failed to create stream: Inappropriate ioctl for device in /in/4ToIP on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/4ToIP on line 4 NULL

preferences:
211.63 ms | 401 KiB | 306 Q