- Output for 5.4.0 - 5.4.45, 5.5.24 - 5.5.30, 5.6.8 - 5.6.15
- Parse error: syntax error, unexpected 'class' (T_CLASS) in /in/74rFE on line 5
Process exited with code 255.
<?php
$bar = 'foo';
$klass = class () {
protected $bar;
public function __construct(...$args) {
$this->bar = $bar;
}
};
new $klass;