3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $fh = fopen('/tmp/123.dat', 'a+'); var_dump(stream_get_meta_data($fh)); fclose($fh); unlink('/tmp/123.dat');
Output for 5.5.32 - 5.5.35, 5.6.18 - 5.6.28, 7.0.3 - 7.1.0
array(9) { ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) ["wrapper_type"]=> string(9) "plainfile" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(2) "a+" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(12) "/tmp/123.dat" }
Output for 5.0.0 - 5.5.31, 5.6.0 - 5.6.17, 7.0.0 - 7.0.2
array(9) { ["wrapper_type"]=> string(9) "plainfile" ["stream_type"]=> string(5) "STDIO" ["mode"]=> string(2) "a+" ["unread_bytes"]=> int(0) ["seekable"]=> bool(true) ["uri"]=> string(12) "/tmp/123.dat" ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) }
Output for 4.3.0 - 4.4.9
array(6) { ["wrapper_type"]=> string(9) "plainfile" ["stream_type"]=> string(5) "STDIO" ["unread_bytes"]=> int(0) ["timed_out"]=> bool(false) ["blocked"]=> bool(true) ["eof"]=> bool(false) }