Human class implementation I just want an indication as to whether or not I'm on the right track regarding PHP OOP, at least on a basic level.  Positive criticism welcome.

P.S. Excuse the visuals of the code.  This is how I usually remember code.

&lt;html&gt;
&lt;?php

//Blueprint

class Human{

    // properties of human
    private $gender;
    private $name;
    private $age;
    private $talk;

    public function __construct($gender, $name, $age, $talk){
        $this-&gt;gender   = $gender;
        $this-&gt;name     = $name;
        $this-&gt;age      = $age;
        $this-&gt;talk     = $talk;
    }

    public function getGender(){
        return $this-&gt;gender;
    }   

    public function getName(){
        return $this-&gt;name;
    }

    public function getAge(){
        return $this-&gt;age;
    }

    public function getTalk(){
        return $this-&gt;talk;
    }
}

class female extends Human{

    //properties of female
    private $bum;
    private $feet; 

    public function __construct($gender, $name, $age, $talk, $bum, $feet){
        parent::__construct($gender, $name, $age, $talk);

        $this-&gt;bum  = $bum;
        $this-&gt;feet = $feet; 
    }

    public function  getBumSize(){
        return $this-&gt;bum;
    }

    public function getFeetSize(){
        return $this-&gt;feet;
    }
}

class male extends Human{

    //properties of male
    private $facialHair;
    private $adamsApple;

    public function __construct($gender, $name, $age, $talk, $facialHair, $adamsApple){
        parent::__construct($gender, $name, $age, $talk);

        $this-&gt;beard    = $facialHair;
        $this-&gt;throat   = $adamsApple; 
    }

    public function getBeard(){
        return $this-&gt;beard;
    }

    public function getThroat(){
        return $this-&gt;throat;
    }
}

//instantiate objects
$malePerson     = new male('male', 'John Doe', '32', 'clear', 'beard', 'adams apple in my throat');
$femalePerson   = new female('female', 'Jane Doe', '28', 'loud', 'big and round', 'small');


echo "Hi, My name is {$malePerson-&gt;getName()}, {$malePerson-&gt;getAge()} years of age, I talk {$malePerson-&gt;getTalk()} 
        so i guess that makes me {$malePerson-&gt;getGender()} a.k.a man....I also have 
        a {$malePerson-&gt;getThroat()} and a {$malePerson-&gt;getBeard()} which is very very long .lol";
echo "&lt;br&gt;";
echo "Hi, My name is {$femalePerson-&gt;getName()}, {$femalePerson-&gt;getAge()} years of age, I talk {$malePerson-&gt;getTalk()} so i 
        guess that makes me {$femalePerson-&gt;getGender()} a.k.a mamalicious....I also have 
         {$femalePerson-&gt;getFeetSize()} feet and a {$femalePerson-&gt;getBumSize()} bum.lol";
?&gt;
&lt;/html&gt;
First of all: Extract your classes into extra files and require_once them as necessary. I found the Java style of having one class per file a very good one.



Second: Learn and start to use PHPDoc to document your code.



//Blueprint


That's not a helpful comment...only write a comment if it is helpful.



// properties of human
private $gender;
private $name;
private $age;
private $talk;


Such structural comments are unnecessary if your class is correctly structured and indented.



$this-&gt;gender   = $gender;
$this-&gt;name     = $name;
$this-&gt;age      = $age;
$this-&gt;talk     = $talk;


Personally I don't like this kind of intending. It can make code easier to read, but in a pure "assign all parameters to all fields" constructors it seems kinda unnecessary.



class female extends Human{


Is it a typo that female is lower case?



private $bum;


If it holds the size of the bum, then it should be called $bumSize. The same goes for $feet.



$malePerson     = new male('male', 'John Doe', '32', 'clear', 'beard', 'adams apple in my throat');


Apart from the unnecessary intending, this is a good example stringly typed programming. You're using a string for everything even though the age should be an integer.

Let's have a look at the basic variables a Human consists of:


$gender Should an enumeration with two values, Male and Female.
$name Names are strings, so it's okay.
$age Is an integer and should therefor be an integer.
$talk Is also a string.


And let's go forth with the Male:


$facialHair Should be an enum, or an integer to indicate strength.
$adamsApple Not sure what this is.


Also forget what I just said about $gender, Human should be an abstract class and getGender() should be an abstract method that is implemented by the next class.



&lt;html&gt;
     &lt;?php Some code with echo... ?&gt;
&lt;/html&gt;


That's not a well-formed HTML document.

&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;Title of your page&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
        Content goes here.
    &lt;/body&gt;
&lt;/html&gt;


Ideally you would perform initializations before the html tag and then just use everything prepared in the body.