title: EventListener in PHP
body: <p>I have been working around a bit with event-listeners in JavaScript as of late and also started working on a small browser-based irc-module and it got me thinking. Is it possible to add an event-listener to the php-script that would update variables, arrays or even echo out the data directly from a database?</p>
  
  <p>I have read <a href="https://stackoverflow.com/questions/4471183/php-event-listener-best-practice-implementation">PHP Event-Listener best-practice implementation</a> among others, but haven't really understood exactly how that would help me. Perhaps I'm just slow at this point, but it would be a great boost if someone could explain to me how to set up an event-listener that would listen towards a mysql-database for changes.</p>
  
  <p>I do not ask anyone to code for me, but to tell me if it works and perhaps even explain how. I do not want to have a javascript-intervall checking the php-file every 100 milisecond to keep the chat flowing, that would only slow it down in the end.</p>
  
  <p>If I have explained myself badly, do say so and I shall try better. I do not have the best reputation for explanations.</p>