title: visitor pattern in PHP
body: <p>I was asked this interview question recently: </p>
  
  <blockquote>
    <p>"Which PHP mechanism allows to use visitor pattern to sort an array?".</p>
  </blockquote>
  
  <p>I am not sure what mechanism we have in PHP? Can anyone provide an example of its use as well?</p>