UOPZ_EXTEND(3) 1 UOPZ_EXTEND(3)
uopz_extend - Extend a class at runtime
SYNOPSIS
void uopz_extend (string $class, string $parent)
DESCRIPTION
Makes $class extend $parent
PARAMETERS
o $class
- The name of the class to extend
o $parent
- The name of the class to inherit
RETURN VALUES
EXAMPLES
Example #1
uopz_extend(3) example
<?php
class A {}
class B {}
uopz_extend(A::class, B::class);
var_dump(class_parents(A::class));
?>
The above example will output something similar to:
array(1) {
["B"]=>
string(1) "B"
}
PHP Documentation Group UOPZ_EXTEND(3)