public function testUsedVariableNew() { $var = 'stdClass'; $this->assertEvaluatesTo(function () use($var) { new $var(); }, new \stdClass()); }