-
-
Save tsh-code/ddf3d67298bce87636c7dfa590c11453 to your computer and use it in GitHub Desktop.
naivefopen2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class XYZ { | |
// ... | |
public static function openForRead(string $id): ?resouce | |
{ | |
$resource = @fopen($id, 'r'); | |
return $resource ? $resource : null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment