Skip to content

Neurosurgeon Class

Neurosurgeon.php - OOP in PHP (Demonstration): Complete Code Listing

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
<?php
    require_once('Surgeon.php');

    class Neurosurgeon extends Surgeon
    {
        // METHODS
        //////////
        public function removeSkull()
        {
            echo "Neurosurgeon $this->name is removing skull!<br/>";
        }
    }