3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $stream = fopen('php://temp', 'r+'); fwrite($stream, ''); fseek($stream, 0); var_dump($stream); $contents = json_decode('', true); if (json_last_error() != JSON_ERROR_NONE) { echo 'oh no'; } var_dump($contents);
based on HT3Qn
Output for 7.0.0 - 7.2.0
resource(5) of type (stream) oh noNULL
Output for 5.3.21 - 5.6.28
resource(5) of type (stream) NULL