Closed thekid closed 4 years ago
See php/php-src#5061, merged Feb. 11th, 2020 and targeted for PHP 8.0
function factory() { return Date::class; } $date= new (factory())(); // instance of Date class
Previously, a temporary variable would have been necessary:
function factory() { return Date::class; } $class= factory(); $date= new $class(); // instance of Date class
See php/php-src#5061, merged Feb. 11th, 2020 and targeted for PHP 8.0
Previously, a temporary variable would have been necessary: