类型初始化

<?php

//In PHP there are no enum type
abstract class PreciousMetal   {
    const Platinum = 0;
    const Gold = 1;
    const Silver = 2;
}

$gold  = PreciousMetal ::Gold;

echo $gold;