PHP

Creating and calling constants in PHP1 min read

It is possible to define constant values on a per-class basis remaining the same and unchangeable. The following sample constants are defined in the class.

<? Php
class Employes {
const AVAILABILITY = “partial”;
const TIME_WORK = 4;
public $status;
}
echo Employees::AVAILABILITY;
?>

Leave a Comment