- Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
- Parse error: syntax error, unexpected 'asdsada' (T_STRING) in /in/C6ITa on line 22
Process exited with code 255.
<?php
class AbilityScore
{
public $value;
public function __construct(int $value)
{
if ($value < 1)
throw new AbilityScoreTooLowException('Ability Score should be at least 1');
$this->value = $value;
}
public function __set($field, $value)
{
throw new Exception('Not here mate!');
}
}
$test = new AbilityScore(10);
$test->value = 11;
var_dump($test);'/*
$test->buuu = 'asdsada';
var_dump($test);*/