Posted in PHP

Terminal CheatSheet

Basic Commands

sudo      Run command as a superuser provision

sudo -s   Login as a superuser

clear     Clears the screen

cal       Shows calendar

date      Shows date & time

exit      Exit from the terminal

man [command] Command manual

whatis [command]  One line description of command

where [command]   shows the command bin path

[command] -h      Help section of the command

Continue reading “Terminal CheatSheet”

Basic Commands

sudo      Run command as a superuser provision

sudo -s   Login as a superuser

clear     Clears the screen

cal       Shows calendar

date      Shows date & time

exit      Exit from the terminal

man [command] Command manual

whatis [command]  One line description of command

where [command]   shows the command bin path

[command] -h      Help section of the command

Continue reading “Terminal CheatSheet”

Posted in PHP

PHP Magic Constants

PHP Magic Constants

PHP provides a large number of constants and some of them are termed as magic constants,
Magic constants are case sensitive, start and ends with undersquare (__) here we are disscussing eight magic constants as follows

__LINE__, __FILE__, __DIR__, __FUNCTION__, __CLASS__, __TRAIT__, __METHOD__, __NAMESPACE__

These magic functions will be more useful on the OOP development process lets understand magic constants in PHP
Continue reading “PHP Magic Constants”

Posted in PHP

Magic Methods in PHP

Magic Methods

Magic methods are PHP predefined functions, starting with two underscores (__), which executes in response to particular PHP events. That might sound slightly automagical but actually it’s pretty straightforward

__construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(), __invoke(), __set_state(), __clone() and __debugInfo()

Let’s dig into magic methods deeply,
Continue reading “Magic Methods in PHP”

Posted in PHP

New Features in PHP 7

New Features in PHP 7

Let see more elaborate of all these features.
Continue reading “New Features in PHP 7”