|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-09 19:22 UTC] tagyboy at gmail dot com
[2013-02-26 04:32 UTC] pollita@php.net
-Status: Open
+Status: Not a bug
[2013-02-26 04:32 UTC] pollita@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 22:00:01 2025 UTC |
Description: ------------ I'm creating an IRC Bot, with plugins. All my Plugins are classes, so if you made a change to your plugin, you hadd to restart to complete bot, to reload all plugins. But then I met runkit, and it would be the perfect solution. But, when I ry to reload all my plugins using Runkit, runkit_import returns true, but the classes aren't reloaded. (When I started the bot through the PHP CLI) Runkit did actually work when I started the bot through my browser. Reproduce code: --------------- public function reload_plugins() { // Check for runkit extension if(!extension_loaded('runkit')) { // Try to load it @dl('runkit'); if(!extension_loaded('runkit')) { throw new Exception('Runkit extension not installed!'); } } // Loop through all plugins foreach($this -> plugins as $name => $instance) { if(runkit_import($this ->plugin_dir . $name.'/plugin.php', RUNKIT_IMPORT_OVERRIDE | RUNKIT_IMPORT_CLASSES)) { $this -> logger -> add($name.' Succesfully reloaded', IrcEvent::Other); } } } Expected result: ---------------- Classes are reloaded, without have to restart my bot. Actual result: -------------- On the PHP CLI, the classes aren't reloaded.