vsc-material-theme/test/source.php

58 lines
777 B
PHP
Raw Normal View History

2018-04-20 20:07:36 +02:00
<?php
/**
function hello($world) {}
*/
// base class with member properties and methods
class Vegetable {
var $edible;
var $color;
Something::class;
SomeThing::class;
function Vegetable($edible, $color="green")
{
$this->edible = $edible;
$this->color = $color;
}
function is_edible()
{
return $this->edible;
}
function what_color()
{
return $this->color;
}
} // end of class Vegetable
// extends the base class
class Spinach extends Vegetable {
var $cooked = false;
function Spinach()
{
$this->Vegetable(true, "green");
}
function cook_it()
{
$this->cooked = true;
}
function is_cooked()
{
return $this->cooked;
}
} // end of class Spinach
?>