Fields and properties

Structures (records)

<?php

//In PHP there are no structures
class ColorPoint {
    //Fields
    public $x, $y;

    //before PHP 8.4 there were no computed
    //properties; 8.4 added property hooks
    public $Color;
}