| Home | Mirror | Search |
Table of Contents
This is the first chapter in my book.
<?php
class foo
{
private $bar;
public function __construct($bar)
{
$this->bar = $bar;
}
/**
* getFoo
*
* Returns bar if $this->bar is foo else foo .. Oo ;D
*
* @return string
*/
public function getFoo()
{
if($this->bar == 'foo')
{
return 'bar';
}
else
{
return 'foo';
}
}
}
#include <stdio.h>
int main(void)
{
printf("Hello, world!\n");
return 0;
}