End-users who wish to create a custom Element Display Condition with PHP are advised to use the Custom PHP condition built-in to Breakdance.
Breakdance provides an Element Display Conditions API to add additional Element Display Conditions to the Conditions Chooser.
Element Display Conditions API documentation is available on GitHub.
Conditions have:
When an element has Element Display Conditions, the element will be shown when the callback for the condition returns true, and hidden when the callback for the condition returns false.