3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $stream = fopen('php://output', 'a'); var_dump($stream); fclose($stream); var_dump($stream); fclose($stream);
Output for 7.0.0 - 7.1.0
resource(5) of type (stream) resource(5) of type (Unknown) Warning: fclose(): supplied resource is not a valid stream resource in /in/t55dd on line 7
Output for 5.2.3 - 5.6.28
resource(5) of type (stream) resource(5) of type (Unknown) Warning: fclose(): 5 is not a valid stream resource in /in/t55dd on line 7
Output for 5.0.0 - 5.2.2
resource(2) of type (stream) resource(2) of type (Unknown) Warning: fclose(): 2 is not a valid stream resource in /in/t55dd on line 7
Output for 4.3.0 - 4.4.9
resource(1) of type (stream) resource(1) of type (Unknown) Warning: fclose(): 1 is not a valid stream resource in /in/t55dd on line 7