Class Wither Method

With is a prefix, that tells the reader that the getter returns a copy of the object, and not the object itself.

<?php

class x {
    private A $property;

    // getter
    public function getProperty() : A {
        return $this->property;
    }

    // wither
    public function withProperty() : A{
        return clone $this->property;
    }
}

?>

Documentation

See also RFC: Accessors

Related : Classes, Class Setter Method, Class Getter Method