Materi sebelumnya:Mereferensikan Instance dari Class (PHP)

Setiap class memiliki properti. Properti class dapat berupa atribut, method/function dan instance. Untuk lebih jelas bisa dilihat pada script di bawah ini:

Nah dari script diatas bisa kita lihat bahwa class Person memiliki properti diantaranya:
  1. Atribut : $namaDepan dan $namaBelakang,
  2. Method: $namaLengkap(),
  3. Instance:$person dan $new_person
 Berikut tampilan outputnya :

Materi Selanjutnya: Memahami Class Inheritance

2 komentar:

  1. agak mbulet ya, tak perbaiki dulu sob hehe

    BalasHapus
:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Terima kasih sudah berkomentar di posting ini