Cannot redeclare property hook “%s

Description

Property hook may only have one definition. It is not possible to have duplicates.

Example

<?php

class Test {
    public $prop {
        GeT {}
        get {}

    }
}

?>

Literal Examples

  • Cannot redeclare property hook “get”

Solutions

  • Remove all but one of the definition.

  • Rename one of them with the other property hook name: may be set had a typo and was written get.

Changed Behavior

This error may appear following an evolution in behavior, in previous versions. See ` <https://php-changed-behaviors.readthedocs.io/en/latest/behavior/.html>`_.