title: Best pattern to write a PHP function that checks on access and returns more then boolean?
body: <p>I'm prototyping behaviour of a new application, and want to write some functions that check on access based on some variable dates.</p>
  
  <p>I just want to write seperate functions for that, like "canUserSeeThis()" and "canUserSeeThat()"</p>
  
  <p>In case one of these returns false, I want to display a message, but I want that message to be defined in these functions, but the rendering taking part outside the functions.</p>
  
  <p>What is the best "pattern" to quickly build such a functionality? Should I let the message be in the return value? Should I work with throwing exceptions? </p>
  
  <p>I'm just prototyping, so I don't want to end up defining a complete API system yet.</p>