Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cannot use the static modifier on a property hook

Description

It is not possible to make individual property hooks static. The keyword must be set at the property definition level, for all the hooks.

Example

<?php

class X {
	public $property {
		static get;
	}
}

?>

Alternatives

  • Remove the abstract keyword, and put it on the property definition level.