1.2.400. Dynamic New

Dynamic instantiation of classes. It happens when the name of the class is an executable expression, and, as such, only known at execution time.

<?php

$classname = foo();
$object = new $classname();

$object = new (foo());

?>

1.2.400.1. Connex PHP features

1.2.400.1.1. Specs

Short name

Classes/DynamicNew

Rulesets

All, Appinfo, CE, Changed Behavior

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Community Edition, Exakat Cloud