Does the Context module check block visibility settings?
Context module ignores Block visibility settings

The Context module does not check (take into account) the "Block visibility settings". If you want that to be the case, then you need to also use the Context Respect module. Some details about this module, from its project page:


  Extends the Context module by making it respect default block settings.
  
  This makes it so you can retain your block visibility when assigning them into various Contexts. You can also 'Override' from the block level to ignore Context Respect.


Alternative to Context module

Have a look at the Rules block visibility module as a valid alternative. Refer to my answer to "How to stop a Views block from displaying to admins, such as user/1?" for more details about it.

By using this module as an alternative, you'd only have to create a Rules Component with Rules Conditions that could be identical to the "PHP code" as in your question. However, if you can, you should try to avoid such PHP code if you have other Rules Conditions available that could be used as an alternative to such PHP code.