PHP based node access control Is there any way that I can use a custom PHP code to control the visibility (proper Drupal access) of a node?

Something similar to content access module, but instead of access control by role, I'd like to have access by PHP code so if it returns true, users can access that node, if not, the node will be access denied?
You might be able to do that by using the HOOK_NODE_VIEW(). In my experience I have had great success using the ACL and content access modules as you can control the view, edit and delete function of the nodes by roles, but also a the node level you can specify what user(s) can have access and what type of access.