3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = fopen('php://memory', "a"); $meta = stream_get_meta_data($s); var_dump($meta['stream_type']);
based on 4ToIP
Output for 5.1.4 - 7.2.0
string(6) "MEMORY"
Output for 4.3.2, 5.0.0 - 5.1.3
Warning: fopen(php://memory): failed to open stream: Inappropriate ioctl for device in /in/jX9ko on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/jX9ko on line 4 NULL
Output for 4.3.3 - 4.4.9
Warning: fopen(php://memory): failed to open stream: Success in /in/jX9ko on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/jX9ko 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/jX9ko on line 3 Warning: stream_get_meta_data(): supplied argument is not a valid stream resource in /in/jX9ko on line 4 NULL