Skip to content

Instantly share code, notes, and snippets.

@webyroki
Created April 8, 2017 21:34
Show Gist options
  • Save webyroki/1e696bbfe7c08a79c46bd347e0377936 to your computer and use it in GitHub Desktop.
Save webyroki/1e696bbfe7c08a79c46bd347e0377936 to your computer and use it in GitHub Desktop.
php OOP exapmle
'foo' . 42 = 'foo42';
'foo' + 'Hi' = 0;
0 . 'qwe' = '0qwe';
=== // равны и одного типа данных
new self(); // создаст экзекмпляр (объект) текущего класса
new static(); // соз. экземпляр вызывающего класса (наследника)
self:: // текущий класс
static:: //
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment