(c) Larry Ewing, Simon Budig, Garrett LeSage
� 1994 �.

������� ����������� � ��������������� �����������

������ | ����� | � ������� | ��������� ��������� | ����������� ��� | �������� ���/AMICT
���������� | ���������� | ������� ������� | ������-��������� | �������� � ��������� ������
�������������� ������� | ���������� | ����� �������� | ���������� ����������

���� ������

�������� ������ ������ � �������� � ��������� � PHP 5. ������� ��������� ����������� ��������� ������ � PHP 5: ������������ ������� ��������� (private, public, protected), ������������, ���������, ������������, ����������� ������ (__clone, __construct)

�������� ������

��������� ��������� ������ �������, ��������� ���������
 #   ������� 
1 ������� ����� NotePad, ����������
��������:
$phone - �������� ������ ���� �������� ������ � ��������� ������;
$name - �������� ������ ���� �������� ��� � ��������� ������, ��� � ��� ���;
$surname - �������� ������ ���� �������� ��� � ��������� ������, ��� � ��� ���.
���������:
TEXT_SIZE = 20 - ������������ ����� ������ ��� ������� ������
������:
note_show - ������� �������� $phone, $name, $surname � TEXT_SIZE.
2 ������� ��������� $note1 ������ NotePad. ������� ����� note_show. ������� �������� TEXT_SIZE ��� ������������� ������ note_show
3 �������� � ����� �����������, ����������� ��� ��������� � ��������������� �������� ������� $phone, $name � $surname ��������������. ������� ��������� $note2 ������ NotePad. ������� �������� ������� ������ � ������� ������ note_show
4 ���������� ����� __clone() ���, ����� ��� ������������ �������� ������� $phone, $name, $surname ����������. ������� ����� $note2_copy ������� $note2. ������� ����� note_show ��� ������� $note2_copy
5 ������� ����� NoteChild, ����������� NotePad. � ������ NoteChild �������������� ����� note_show ��������� �������:
�) note_show ������� ��� �������� ������ (��. ����� ���������������� �������� magic constants);
a) note_show ������� ������ "����� ������������� ������ note_show ...";
�) �������� ����� note_show �������������� ������
6 ������� ������ $child1 ������ NoteChild. ������� ����� note_show. ������� ����� $child1_copy ������� $child1. ������� �������� ������� $phone, $name, $surname ��� ������� $child1_copy
7 �������� � ����� NoteChild ����� cut_note, ������� �������� ��������� �������� ������� $phone, $name, $surname �� ������������ �����, ����������� ��������� ��������� TEXT_SIZE. ������� ������ $child2 ������ NoteChild � ������� ��� ���� ����� cut_note. ������� �������� ������� $phone, $name, $surname ��� ������� $child2.

����� �������� ������ ����� ������������ ������� ��� �������������� ����� mb_substr ��� mb_strcut, ��������� �������� ��������� "UTF-8".

�������� �������� �� ������ ��� ��������� � �������� (private) �������� $phone. �������� ����������� ������� ��������� ��� $phone, ����� �������� ������.