Skip to content

Dermatologist Class

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

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

    class Dermatologist extends Doctor
    {
        // METHODS
        //////////
         public function popPimples()
        {
            echo "Dermatologist $this->name is popping pimples.<br/>";
        }
    }