Sure, there you go:
<?php
/**
* This class has no __call, or __set/__get magic functions defined
* @property string $DeclaredProperty
* @method method14($name)
*/
class MyClass
{
public $Property1;
public function method1($name){
}
}
$sc = new MyClass();
$sc->Property1 = 5; // OK - statically defined
$sc->DeclaredProperty = "12"; // OK - defined through @property
$sc->Property1559 = 5; // ERROR - That is an error. There is no __set method defined and there is no @property declaration
$sc->method1("Yes"); // OK - statically declared
$sc->method14(); // OK, declared through @method
$sc->method2(); // ERROR - not defined or declared
class MyDynamicClass
{
public function __call($name, $arguments)
{
}
public function __set($name, $value)
{
}
public function __get($name)
{
}
}
$dc = new MyDynamicClass();
$dc->Whatever = 12;// Everything goes
$dc->NonExistent();// Everything goes