Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
md5 123$param = 123;
$result = '';
include("md5.php");
$jabber->send($result);
-- main.php --
interface IWorker { function doWork(); }
class Worker1 extends IWorker { function doWork() { ... } }
$worker = new Worker1();
function main() {
...
if ($newClassAvailable)
require($newClass);
...
$GLOBALS['worker']->doWork();
...
}
newclass.php
class Worker2 extends IWorker { function doWork() { ... } }
$GLOBALS['worker'] = new Worker2();
class MyTester_V99 implements MyTester_Interface {
public function test() { ... }
}
if (class_exists('TesterRegistry')) {
TesterRegistry::register('MyTester_V99');
}
function includeTester($registry) {
include('MyTester_V99.php');
}
if (($this->_current_fn != null) && ($this->_current_timestamp != null))
Горячая замена кода (code hot swapping) в РНР