- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
- Parse error: syntax error, unexpected 'class' (T_CLASS), expecting variable (T_VARIABLE) or '$' in /in/ZgqVM on line 19
Process exited with code 255.
<?php
namespace Foo\Bar;
class Bar {}
var_dump(new Bar);
namespace Foo\Baz;
use Foo\Bar\Bar;
class Baz {
public function __construct(){
$str1 = '\\Foo\\Bar\\Bar';
$str2 = 'Bar';
var_dump(new Bar);
var_dump(new $str1);
var_dump(new $str2::class);
}
}
$baz = new Baz;