Using Class Visibility Operators

<?php
class cd {
    public $artist;
    public $title;
    protected $tracks;
    private $disk_id;
}$mydisk = new cd();$mydisk->artist = 'Singers';$mydisk->tracks = array('Bus', 'Little');
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.