Nesne Yönelimli Programlama (OOP)

Kısaca sınıflara bir çok fonksiyonu bir düzene göre bir arada barındıran yapılardır diyebilir.

Tanımlamalar

img.png

$this Kullanımı

$this içinde bulunulan nesneyi temsil eder.

img_2.png

Özelliğe Değer Atama

img_3.png

Sabit Tanımlama

const SABIT_ISMI = 'Sabit Değer'; // şeklinde tanımlanız.

echo SinifAdi::SABIT_ISMI; // şeklinde kullanılır.

Lesson discussion

Swap insights and ask questions about PHP Temel

Be the first to start the discussion

Ask a question or share your thoughts about this lesson.