- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
- Parse error: syntax error, unexpected 'proteced' (T_STRING), expecting function (T_FUNCTION) in /in/XY9Sc on line 14
Process exited with code 255.
<?php
class SetOnce {
private $value;
public function __construct($value) {
$this->value = $value;
}
public function getValue() {
return $this->value;
}
}
class Foo {
proteced $bar;
function __construct($val) {
$this->bar = new SetOnce($val * 2);
}
function getBar() {
return $bar->getValue();
}
}