When using this function to override an existing class, you need to be careful in cases where the new definition 'extends' another class - it won't work.
For example,
<?php
class BaseCls { }
class TestCls extends BaseCls {
function hi () { echo "Hi"; }
}
runkit_import('test2.php');
?>
<?php
class TestCls extends BaseCls {
function hi () { echo "Hi again!"; }
}
?>
will NOT work. In file two, you need to omit the 'extends BaseCls'. Note however, that anything from BaseCls will still be in TestCls since it was defined originally in file 1.
From what I can tell, runkit_import defines and overwrites elements - however it does not delete.