# defender-security/5.7.0/vendor/thecodingmachine/safe/generated/classobj.php

Defender Security – Malware Scanner, Login Security &amp; Firewall, version 5.7.0. 26 lines.

- Page: https://pluginprobe.com/plugins/defender-security/5.7.0/code/vendor/thecodingmachine/safe/generated/classobj.php
- Raw: https://pluginprobe.com/plugins/defender-security/5.7.0/raw/vendor/thecodingmachine/safe/generated/classobj.php
- Modified: 2022-06-13T09:01:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/defender-security/5.7.0/code/vendor/thecodingmachine/safe/generated/classobj.php#L10-L20`.

```php
<?php

namespace Safe;

use Safe\Exceptions\ClassobjException;

/**
 * Creates an alias named alias
 * based on the user defined class original.
 * The aliased class is exactly the same as the original class.
 *
 * @param string $original The original class.
 * @param string $alias The alias name for the class.
 * @param bool $autoload Whether to autoload if the original class is not found.
 * @throws ClassobjException
 *
 */
function class_alias(string $original, string $alias, bool $autoload = true): void
{
    error_clear_last();
    $result = \class_alias($original, $alias, $autoload);
    if ($result === false) {
        throw ClassobjException::createFromPhpError();
    }
}

```
