PHP 8.5.0 Alpha 4 available for testing

Voting

: one minus zero?
(Example: nine)

The Note You're Voting On

elliseproduction at gmail dot com
5 years ago
You can add a alias inside a class :

<?php

class foo{

function
__construct(){

echo(
'yes!');

}
}

class
bar {

function
__construct(){

class_alias('foo', 'fooAlias');

}

function
test(){

new
fooAlias;

}

}

$bar=new bar;

$bar->test(); // yes!

<< Back to user notes page

To Top