strlen
���������� ����� ������.
��������� :
int strlen(string str)
���������� ������ ����� ������, �.�., ������� �������� ���������� � str.
������ ����� ��������� ����� �������, � ��� ����� � � ������� �����. ������� strlen() ����� ��������� �������� � � ������ ��������.
���������� ����� ������.
��������� :
int strlen(string str)
���������� ������ ����� ������, �.�., ������� �������� ���������� � str.
������ ����� ��������� ����� �������, � ��� ����� � � ������� �����. ������� strlen() ����� ��������� �������� � � ������ ��������.
count_chars
���������� ���������� � �������� ������.
��������� :
mixed count_chars(string str [, int mode])
������� count_chars() ������������ ������� ������������� ������� ����� (0-255) � ������ str � ���������� � ������� ��������� �������� ��������������� ��������� mode. mode ����� ��������� ��������� ��������:0 (�� ���������)- ������ � ������� � �������� �������� � �������� ���������� � �������� �������� �������� �������
1 - ����� �� 0, �� ������������� � ������ str ����� �� ������������
2 - ����� �� 0, �� ������������ ������ �� �����, ������� �����������
3 - ������������ ������, ��������� �� ���� ������������ ��������
4 - ������������ ������, ��������� �� ���� ������������� ��������
���������� ���������� � �������� ������.
��������� :
mixed count_chars(string str [, int mode])
������� count_chars() ������������ ������� ������������� ������� ����� (0-255) � ������ str � ���������� � ������� ��������� �������� ��������������� ��������� mode. mode ����� ��������� ��������� ��������:
md5
��������� ������-���� MD5.
��������� :
string md5(string str);
���������� ���-��� ������ str, ���������� �� ��������� ���������� RSA Data Security ��� ��������� "MD5 Message-Digest Algorithm". ���-��� - ��� ������ ������, ����������� ���������� ��� ������ �� ����� str. �� ���� ����������� ����, ��� ��� ������ ������, ���������� � str, ����� ��� ���������� ���-���, ���������� � ����.
� �� �� �����, ���� ����� ������ str ����� ��������� ���������� ����� ��������, �� �� MD5-��� �������� �������� 32 �������.
��������� ������-���� MD5.
��������� :
string md5(string str);
���������� ���-��� ������ str, ���������� �� ��������� ���������� RSA Data Security ��� ��������� "MD5 Message-Digest Algorithm". ���-��� - ��� ������ ������, ����������� ���������� ��� ������ �� ����� str. �� ���� ����������� ����, ��� ��� ������ ������, ���������� � str, ����� ��� ���������� ���-���, ���������� � ����.
� �� �� �����, ���� ����� ������ str ����� ��������� ���������� ����� ��������, �� �� MD5-��� �������� �������� 32 �������.
crc32
��������� ���������� ������ crc32.
��������� :
int crc32(string str);
������� crc32() ��������� 32-������ ����������� ����� ������ str. �� ����, ��������� �� ������ - 32-������ (4-��������) ����� �����.
������ ��� ������� ���������� ��� �������� ����������� ���������� ������.
��� ������� �������� ������� ������� md5(), �� � �� �� ����� ������ ������� ����� �������� "���-����" ��� ������. ��� ���, ������, ����� �������� ������� ���������� ������� ��� ���� ������ ����� ���������� "���-����", ��� ����������� �� �������� ��� ������ ������ ������� ����������, � ���� ���� ���-������.
��������� ���������� ������ crc32.
��������� :
int crc32(string str);
������� crc32() ��������� 32-������ ����������� ����� ������ str. �� ����, ��������� �� ������ - 32-������ (4-��������) ����� �����.
������ ��� ������� ���������� ��� �������� ����������� ���������� ������.
��� ������� �������� ������� ������� md5(), �� � �� �� ����� ������ ������� ����� �������� "���-����" ��� ������. ��� ���, ������, ����� �������� ������� ���������� ������� ��� ���� ������ ����� ���������� "���-����", ��� ����������� �� �������� ��� ������ ������ ������� ����������, � ���� ���� ���-������.
crypt
���������� ������������ ����������.
��������� :
string crypt(string str [,string salt]);
� ��������� str �������� ������, ������� ���� �����������.
���-��� ��� ����� � ��� �� ������, �� � ���������� ���������� salt (������, ��� ������ ���� ����������� �������������� ������) ���� ������ ����������. ���� �������� salt ��������, PHP ����������� ��� ��������� �������.
� ��������, ������� ������������ ��������� ���������� ����������, ��������� ��������� ��������������� ������� 1 ��� 0, � ����������� �� ����, �������������� �� ������ �������� ��� ���:CRYPT_STD_DES - ����������� 2-�������� DES-���������� (SALT=2)
CRYPT_EXT_DES - ����������� 9-�������� DES-���������� (SALT=9)
CRYPT_MD5 - 12-�������� MD5-���������� (SALT ���������� � $1$)
CRYPT_BLOWFISH - ����������� 12-�������� DES-���������� (SALT ���������� � $2$)
�.�. ������ ������� ���������� ������������� �������� ����������, �� ������� ������������ �� �������.
���������� ������������ ����������.
��������� :
string crypt(string str [,string salt]);
� ��������� str �������� ������, ������� ���� �����������.
���-��� ��� ����� � ��� �� ������, �� � ���������� ���������� salt (������, ��� ������ ���� ����������� �������������� ������) ���� ������ ����������. ���� �������� salt ��������, PHP ����������� ��� ��������� �������.
� ��������, ������� ������������ ��������� ���������� ����������, ��������� ��������� ��������������� ������� 1 ��� 0, � ����������� �� ����, �������������� �� ������ �������� ��� ���:
�.�. ������ ������� ���������� ������������� �������� ����������, �� ������� ������������ �� �������.
metaphone
���������� ���������� �������-����.
��������� :
string metaphone(string str);
������ ������� ����� �� �������� � soundex(), ��������� ��� ������������ �����, ����������� � ������ str, �� � ���������� ��������� ����������, �.�. ���������� ������� ������������ ����������� �����.
������������ ��������� �������� ����� ���� ���������� �����.
���������� ���������� �������-����.
��������� :
string metaphone(string str);
������ ������� ����� �� �������� � soundex(), ��������� ��� ������������ �����, ����������� � ������ str, �� � ���������� ��������� ����������, �.�. ���������� ������� ������������ ����������� �����.
������������ ��������� �������� ����� ���� ���������� �����.
soundex
���������� ���� ��������� ������������.
��������� :
string soundex(string str);
������� soundex() ������������ ��� �������� ������������, ����� �������������� �������� ��� ������ �����, �� �� ��������, ��� ��� �������, � ������� ������� (���� ������), ������������ �������� ����� ����������� ��������.
������������ ������ �� 4 ��������: ������ ����� ����� � 3 �����.
���������� ���� ��������� ������������.
��������� :
string soundex(string str);
������� soundex() ������������ ��� �������� ������������, ����� �������������� �������� ��� ������ �����, �� �� ��������, ��� ��� �������, � ������� ������� (���� ������), ������������ �������� ����� ����������� ��������.
������������ ������ �� 4 ��������: ������ ����� ����� � 3 �����.
soundex("Euler") == soundex("Ellery") == "E460"; soundex("Gauss") == soundex("Ghosh") == "G200"; soundex("Hilbert") == soundex("Heilbronn") == "H416"; soundex("Knuth") == soundex("Kant") == "K530"; soundex("Lloyd") == soundex("Ladd") == "L300"; soundex("Lukasiewicz") == soundex("Lissajous") == "L222";