| 1 | <?php |
||
| 18 | class SetNode extends Branch |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * Constructor. |
||
| 22 | * |
||
| 23 | * @param string $name |
||
| 24 | * @param \Zicht\Tool\Script\Node\Node $expr |
||
| 25 | */ |
||
| 26 | public function __construct($name, $expr) |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Compiles the arg node. |
||
| 36 | * |
||
| 37 | * @param \Zicht\Tool\Script\Buffer $buffer |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | public function compile(Buffer $buffer) |
||
| 50 | } |
||
| 51 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: