<?php
class Circle
{
const PI = 3.14159265359;
public function circumference($diameter)
{
return $diameter * self::PI;
}
}
echo Circle::PI . PHP_EOL;
$circle = new Circle;
echo $circle::PI . PHP_EOL;
echo $circle->circumference(3) . PHP_EOL;
const PIE = 'Pizza Pie';
echo PIE;
To embed this project on your website, copy the following code and paste it into your website's HTML: