Change the content of PHP classes and methods at runtime, with Reflection? -


this fun only, don't scream please.

i rewrite content of class's methods @ runtime (i mean, without modifying file, replacing/editing code in memory), possible?

using reflection, or else?

don't close question please, i'm looking answer runkit.

why not create new class inherits 1 want modify , overwrite it's methods?

<?php class mysimplexml extends simplexmlelement {     public function themethodiwanttooverwrite() {         //...     } } ?> 

as long method isn't marked final...


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -