- error_reporting: documentation ( source)
<?php
error_reporting(E_STRICT);
class ImplicitPropertyClass
{
protected function on_start()
{
$this->implicitProperty = 'a';
}
public function __construct()
{
$this->on_start();
}
}
class ExplicitPropertyClass
{
public $property;
protected function on_start()
{
$this->property = 'a';
}
public function __construct()
{
$this->on_start();
}
}
$a = new ImplicitPropertyClass();
$b = new ExplicitPropertyClass();