Panels visibility rule: Hide if value is in the query string
Using PHP code is not recommended unless absolutely necessary. You never want to store the PHP code in database, you do that in the modules :-)

I would recommend you to write an ctools access plugin for the same; check the logic there and give access to users accordingly.

Benifits:


The code is more maintainable, and can be version controlled.
You could reuse the same visibility rule throughout the site wherever necessary.


Please check my answer here, for an example of a working access plugin.