The PHP configuration file, php.ini, is the final and most immediate way to affect PHP's functionality. The php.ini file is read each time PHP is initialized. in other words, whenever httpd is restarted for the module version or with each script execution for the CGI version.
Featured Post
What is the purpose of the php.ini file?
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...
What is the purpose of the php.ini file?
Difference between Abstract class and Interfaces.
Abstract class:
- Abstract class comes under partial abstraction.
- Abstract classes can maintain abstract methods and non abstract methods.
- In abstract classes, we can create the variables.
- In abstract classes, we can use any access specifier.
- By using 'extends' keyword we can access the abstract class features from derived class.
- Multiple inheritance is not possible.
Interface:
- Interface comes under fully abstraction.
- Interfaces can maintain only abstract methods.
- In interfaces, we can't create the variables.
- In interface, we can use only public access specifier.
- By using 'implement' keyword we can get interface from derived class.
- By using interfaces multiple inheritance is possible.
The Difference Between Abstract Class and Interface in PHP
Introduction
SOLID Principles in PHP
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.
- Single Responsibility: A Class should be responsible for a single task.
- Open-Close Principle: A Class should be open to extension and close to modification.
- Liskov Substitution: A derived Class can be substituted at places where base Class is used.
- Interface Segregation: Don’t make FAT Interfaces. i.e. Classes don’t have to override extra agreements that are not needed for that Class simply because it is there in interface.
- Dependency Inversion: Depend on abstractions, not on concretions. Not only high level Classes but low level Classes also depend on the abstractions in order to decouple the code.
What are different Clauses used in SQL?
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);
Is PHP a strongly typed language?
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 |
PHP 5.5.0 Release
- Added generators and coroutines.
- Added the finally keyword.
- Added a simplified password hashing API.
- Added scalar class name resolution via ::class.
- Added the Zend OPcache extension for opcode caching.
- The GD library has been upgraded to version 2.1 adding new functions and improving existing functionality.
- A lot more improvements and fixes.
Features and advantages of OBJECT ORIENTED PROGRAMMING?
- One of the main advantages of OO programming is its ease of modification.
- Objects can easily be modified and added to a system there by reducing maintenance costs.
- OO programming is also considered to be better at modeling the real world than is procedural programming.
- It allows for more complicated and flexible interactions.
- OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns.
- For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused.
- Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.
Popular Posts
-
You can find maximum salary for each department by grouping all records by DeptId and then using MAX() function to calculate maximum sala...
-
Answer: select * from emp where hiredate < (’01-jan-81’);