mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
18 lines
281 B
PHP
18 lines
281 B
PHP
--TEST--
|
|
new with an arbitrary expression
|
|
--FILE--
|
|
<?php
|
|
|
|
$class = 'class';
|
|
var_dump(new ('std'.$class));
|
|
var_dump(new ('std'.$class)());
|
|
$obj = new stdClass;
|
|
var_dump($obj instanceof ('std'.$class));
|
|
|
|
?>
|
|
--EXPECT--
|
|
object(stdClass)#1 (0) {
|
|
}
|
|
object(stdClass)#1 (0) {
|
|
}
|
|
bool(true)
|