Voting

: max(one, six)?
(Example: nine)

The Note You're Voting On

ignacio at inek dot com dot ar
6 months ago
In case you have a public readonly property in a class you need to extend, adding other properties, this can be a way to do it:

<?php

class A {
public function
__construct(
public readonly
int $prop
) {}
}

class
B extends A {
public function
__construct(
int $prop,
public readonly
int $prop2
) {
parent::__construct($prop);
}
}
?>

<< Back to user notes page

To Top