PHP

Objects, properties & -> (PHP)

Në shqip: Objektet dhe vetitë në PHP

ShpjegimiSQ

Objekti krijohet me new, dhe vetitë e metodat arrihen me shigjetën ->: $nx->emri, $nx->shfaq(). Brenda klasës, $this tregon objektin aktual.

EnglishEN

An object is created with new, and properties and methods are reached with the arrow ->: $s->name, $s->show(). Inside the class, $this refers to the current object.

Si ta mendosh

Si telekomanda: shigjeta të çon te butoni i duhur.

Lexoje në anglisht

Like a remote control: the arrow takes you to the right button.

Shembull kodiphp

$nx = new Nxenes("Arta");
echo $nx->emri;
$nx->vendosNoten(9);

Terma të lidhur