Creating a copy of an object with fully replicated properties is not always the wanted behavior. Example …
Topic Archives: PHP
What are the differences in die() and exit() in PHP?
Ooops!!! there is no difference in die() and exit(). die() is equivalent to exit and vice versa. But why these …
Difference between htmlentities() and htmlspecialchars()
htmlspecialchars only takes care of <, >, single quote ‘, double quote ” and ampersand. htmlentities translates all occurrences of …
Difference between echo, print and printf
echo is the most primitive of them, and just outputs the contents following the construct to the screen. print …
Magic Methods
PHP reserves all function names starting with __ as magical.
__sleep :- This function is executed …
Difference between include and require
It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and …
MySQL Reconnect In PHP
Can use the inbuilt function mysql_ping(), which will check whether or not the connection to the server …
Autoloading Classes In PHP
Many developers writing object-oriented applications create one PHP source file per-class definition. One of the biggest …
Get File Path Info Using PHP pathinfo Function
The pathinfo file returns the informations about a given path, like filename,basename,extension. No need of playing around with string positions, …
PHP Magic Methods
PHP reserves all function names starting with __ as magical. It is recommended that you do …
http_build_query function usage
Generate URL-encoded query string from an array of argument variables. The separator is & by default and for changing that with …
PDO Connection And DNS Settings For Different Databases.
PDO(PHP Data Objects) is one of main feature of PHP 5.1 to managing databases. It is developed to provide a …
Get Bible Verse of day Using JSON
Following it a simple code snippet with uses JSON (Javascript Object Notation) to fetch the Bible Verse of the Day from …
Crontab Commands
Crontab (CRON TABle) is a file which contains the schedule of cron entries to be run and at specified times. …
PO to MO converter
Simply we can convert PO(portable Object) to MO(Machine Object) Using Poedit or from the GNU gettext msgfmt command.( see the …
Extract the strings from source code for Translation (po file)
To extract the strings to be translated from the program source code. This is achieved with xgettext. I think you …
