(No version information available, might only be in CVS)
class_alias — Creates an alias for a class
Creates an alias named alias base on the defined class original . The aliased class is exactly the same as the original class.
The original class.
The alias name for the class.
성공할 경우 TRUE를, 실패할 경우 FALSE를 반환합니다.
Example #1 class_alias() example
<?php
class foo { }
class_alias('foo', 'bar');
$a = new foo;
$b = new bar;
// the objects are the same
var_dump($a == $b, $a === $b);
var_dump($a instanceof $b);
// the classes are the same
var_dump($a instanceof foo);
var_dump($a instanceof bar);
var_dump($b instanceof foo);
var_dump($b instanceof bar);
?>
위 예제의 출력:
bool(true) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true)