| echo | |
|---|---|
| Can output multiple strings | Outputs one string only |
| Faster | Slightly slower |
| No return value | Returns 1 |
The PHP configuration file, php.ini , is the final and most immediate way to affect PHP's functionality. The php.ini file is read ea...
| echo | |
|---|---|
| Can output multiple strings | Outputs one string only |
| Faster | Slightly slower |
| No return value | Returns 1 |
Abstract class:
Member Variable − These are the variables defined inside a class. This data will be invisible to the outside of the class and can be accessed via member functions. These variables are called attribute of the object once an object is created.
Member function − These are the function defined inside a class and are used to access object data.
This post is to provide an easy to understand idea about the implementation of one of the most “talked about” principles of Object Oriented Programming - SOLID principles. As a programmer, there might come a time when we are so consumed in finishing the task at hand that we forget the world around us. And in the very same world, somewhere lost are the programming principles that we read about and planned to use next time. So let’s try to look at the SOLID principles in one of the simplest way possible so that we can practice them while coding.
So let’s dig in to the SOLID principles at a glance.
WHERE Clause: This clause is used to define the condition, extract and display only those records which fulfill the given condition.
Syntax:
SELECT column_name(s) FROM table_name WHERE condition;
GROUP BY Clause: It is used with SELECT statement to group the result of the executed query using the value specified in it. It matches the value with the column name in tables and groups the end result accordingly.
Syntax:
SELECT column_name(s) FROM table_name GROUP BY column_name;
HAVING clause: This clause is used in association with the GROUP BY clause. It is applied to each group of results or the entire result as a single group. It is much similar as WHERE clause but the only difference is you cannot use it without GROUP BY clause
Syntax:
SELECT column_name(s) FROM table_name GROUP BY column_name HAVING condition;
ORDER BY clause: This clause is used to define the order of the query output either in ascending (ASC) or in descending (DESC). Ascending (ASC) is set as the default one but descending (DESC) is set explicitly.
Syntax:
SELECT column_name(s) FROM table_name WHERE condition ORDER BY column_name ASC|DESC;
USING clause: USING clause comes in use while working with SQL JOIN. It is used to check equality based on columns when tables are joined. It can be used instead of the ON clause in JOIN.
Syntax:
SELECT column_name(s) FROM table_name JOIN table_name USING (column_name);
No. PHP is a weakly typed or loosely typed language.
This means PHP does not require to declare data types of the variable when you declare any variable like the other standard programming languages C# or Java. When you store any string value in a variable, then the data type is the string and if you store a numeric value in that same variable then the data type is an Integer.
Sample code:
$var = "Hello"; //String$var = 10; //Integer |
| Codepad | PHP Version(s) | Note |
|---|---|---|
| writecodeonline.com | PHP 4.4.9 | Legacy needs? |
| codepad.org | PHP 5.2.5 | Many languages, good history |
| ideone.com | PHP 5.2.12 (pl0-gentoo) | Many langauges, good history |
| freephptest.com | PHP 5.2.17 | Not very accessible |
| coderun.com (ide) | PHP 5.3.1 | Not suitable for quick testing |
| phpcodepad.com | PHP 5.3.2 | Not very accessible |
| codepad.viper-7.com | PHP 5.2, PHP 5.3, PHP 5.4 + trunk | A PHP coders paradise |
TRUE if the connection was aborted.