run code in 150+ php & hhvm versions
Bugs & Features
<?php $handle = fopen(__FILE__, 'r'); var_dump(get_resource_type($handle)); fclose($handle); var_dump(gettype($handle), $handle);
Output for 5.2.3 - 5.6.21, 7.0.0 - 7.1.0RC4
string(6) "stream" string(12) "unknown type" resource(5) of type (Unknown)
Output for hhvm-3.12.0
string(6) "stream" string(12) "unknown type" resource(4) of type (Unknown)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.0 - 5.2.2
string(6) "stream" string(12) "unknown type" resource(2) of type (Unknown)
Output for 5.0.0 - 5.0.5
string(6) "stream" string(8) "resource" resource(2) of type (Unknown)
Output for 4.3.0 - 4.4.9
string(6) "stream" string(8) "resource" resource(1) of type (Unknown)