Not sure what you mean by "the" php plugins system. PHP can make use of PHP extensions (like a PECL extension) but there is no other general 'plugin' concept for php as far as I know.
PHP Projects often have plugin features. Like Drupal or Joomla or other such projects. How you write plugins for those depends on which one you are using. You'll have to look at each of those for more info.
If you want a plugin system for your script, it can be nearly anything you want. It all depends on how you choose to make your code visible to plugin writers.
An easy system might be one where you tell people to write their plugins by creating a PHP script and then put it into some folder -- say it was /var/www/html/plugins. Then you your script could [man]include[/man] or [man]require[/man] every php file in that folder. This could be really risky if you don't trust people who write plugins. You'd also have to inform plugin writers about what kind of data structures you have created for them so they know how to work with your system.