SlideShare ist ein Scribd-Unternehmen logo
1 von 60
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
Agenda
❖ History of PHP
❖ Salary Trends
❖ Companies using PHP
❖ PHP basic level interview Questions
❖ PHP Advance level interview Questions
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
History of PHP
Created in 1994
by Rasmus
Lerdorf
In June of 1995,
Rasmus released the
source code for PHP
Tools to the public
In April 1996
Rasmus
introduced
PHP/FI
In June, PHP/FI
was given a
version 2.0 status
In November, 1997,
the underlying parsing
engine was already
being entirely
rewritten.
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Salary Trend
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
Companies using PHP
Copyright Š 2018, edureka and/or its affiliates. All rights reserved.
02
01 Basic level
Advance level
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
01 What are the common uses of PHP?
01
02
03
04
05
It performs system functions
It can handle forms
It can modify elements within the database
It can Access cookies variables
It can restrict users to access pages
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
02 What is PEAR in PHP?
PEAR is a framework and repository for reusable PHP
components. It stands for PHP Extension and Application
Repository.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
03 What is the difference between static and dynamic websites?
Static Websites Dynamic Websites
In static websites,
content can't be
changed after
running the script.
In dynamic
websites, content
of script can be
changed at the run
time.
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
04 How to execute a PHP script from the command line?
To execute a PHP script, use the PHP Command Line Interface (CLI)
and specify the file name of the script
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
05 Is PHP a case-sensitive language?
PHP is partially case sensitive. The variable
names are case-sensitive but function names
are not.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
06 What is the meaning of 'escaping to PHP'?
The PHP parsing engine needs a way to differentiate PHP code from other
elements in the page. The mechanism for doing so is known as 'escaping to
PHP'.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
07 What are the characteristics of PHP variables?
01
02
03
04
05
06
Denoted with a dollar ($) sign
Variable is the value of its most recent assignment
Variables are assigned with the = operator
Variables need not be declared before assignment
Variables in PHP do not have intrinsic types
Variables used before they are assigned have default values
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
08 What are the different types of PHP variables?
2 31 4 5 6 7 8
Integers
Doubles Boolean
Null
Strings
Arrays
Objects
Resources
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
09 What are the rules for naming a PHP variable?
01
02
Must begin with a letter or underscore character
Cannot use characters like + , - , % , ( , ) . &
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
10 What are the rules to determine the "truth" of any value which is
not already of the Boolean type?
01
02
03
04
05
06
It is false if exactly equal to zero and true otherwise.
It is false if the string is empty and true otherwise.
Values of Type Null are always False.
Array is false if it contains no values and true otherwise.
Valid resources are true.
Don’t use doubles as Booleans.
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
11 What is NULL?
NULL is a special data type which can have only one value. A variable of
data type NULL is a variable that has no value assigned to it.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
12 How do you define a constant in PHP?
To define a constant you have to use define() function and to retrieve
the value of a constant, you have to simply specifying its name.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
13 What is the purpose of constant() function ?
The constant() function will return the value of the constant.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
14 What are the differences between PHP constants & variables ?
VariablesConstants
•No dollar ($) sign required
•Defined using define()
function
•Defined and accessed
anywhere
•Cannot be redefined or
undefined
•Must be written with dollar ($)
sign
•Defined by simple assignment
•Functions can create and
access variables within own
scope
•Can be redefined for each
path individually
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
15 Name some of the constants in PHP and their purpose.
It represents the full
path and filename of
the file.
It returns the class name as
it was declared.
It represents the class
method name.
It represents the function
name.
It represents the current line
number of the file.
__LINE__ __FILE__ __FUNCTION__ __CLASS__ __METHOD__
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
16 What is the purpose of break & continue statement?
Break - It terminates the for loop or switch statement and transfers
execution to the statement immediately following the for loop or
switch.
Continue - It causes the loop to skip the remainder of its body and
immediately retest its condition prior to reiterating.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
17 What are the two most common ways to start & finish a PHP
code block?
01
02
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
18 What is the difference between PHP4 & PHP5?
PHP5PHP4
•Construct & Class have
same name.
•Passed by value
•Does not declare class as
abstract
•Does not have static
methods & properties in
class
•Contructors are named
_construct & destructors as
_destruct
•Passed by reference
•Allows to declare a class as
abstract
•Allows to have static methods
& properties in class.
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
19 What is the meaning of a final class and a final method?
The final keyword in a method declaration indicates that the method cannot
be overridden by subclasses. A class that is declared final cannot be
subclassed. This is particularly useful when we are creating an immutable
class like the String class.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
20 How can PHP and JavaScript interact?
PHP and Javascript cannot directly interact since PHP is
a server side language and Javascript is a client-sidelanguage.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
21 How can PHP and HTML interact?
It is possible to generate HTML through PHP scripts, and it is possible to pass
pieces of information from HTML to PHP.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
22 How can you compare objects in PHP?
We use the operator ‘==’ to test if two objects are instanced from the
same class and have same attributes and equal values. We can also
test if two objects are referring to the same instance of the same class
by the use of the identity operator ‘===’.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
23 Name some of the popular frameworks in PHP.
CakePHP CodeIgniter Yii 2 Symfony
Zend
Framework
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
24 What are the data types in PHP?
2 31 4 5 6 7 8
Integers
Float Boolean
Null
Strings
Arrays
Objects
Resources
9
Callable
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
25 What are Constructor & Destructor in PHP?
PHP constructor and destructor are
special type functions which are
automatically called when a PHP class
object iscreated and destroyed.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
26 What are include() and require() functions?
Include – It is used to put data of one PHP file into another PHP
file.
Require - If there are any errors then the require() function
produces a warning and a fatal error and stops the execution of
the script.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
27 What is the main difference between require() & require_once()?
• The require() includes and evaluates a specific file, while
require_once() does that only if it has not been included
before.
• The require_once() statement can be used to include
a php file in another one, when you may need to include the
called file more than once.
• So, require_once() is recommended to use when you want to
include a file where you have a lot of functions.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
28 What are the different types of errors available in PHP?
E_ERROR E_WARNING E_PARSE E_NOTICE
E_CORE_ERRORE_CORE_WARNINGE_COMPILE_ERRORE_USER_ERROR
E_USER_WARNING E_USER_NOTICE E_STRICT E_ALL
01 02 03 04
08 07 06 05
09 10 11 12
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
29 Explain the syntax for ‘foreach’ loop with example.
The foreach statement is used to loop through arrays.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
30 What are the different types of Arrays in PHP?
Indexed Array01
Associative Array02
Multidimensional Array03
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
31 What is the difference between single quoted and double quoted
string?
Singly quoted strings are treated
almost literally, whereas doubly
quoted strings replace variables
with their values as well as specially
interpreting certain character
sequences.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
32 How to concatenate two strings in PHP?
To concatenate two string variables together, we use the dot
(.) operator
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
33 How is it possible to set an infinite execution time for PHP script?
The set_time_limit(0) added at the beginning of a script sets
to infinite the time of execution to not have the PHP error
‘maximum execution time exceeded.’
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
34 What is the difference between “echo” and “print” in PHP?
• PHP echo output one or more
string.Whereas, PHPprint output a string.
• Echo can output one or more string but print can only output
one string and always returns 1.
• Echo is faster than print because it does not return any value.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
35 Name some of the functions in PHP.
ereg() Split() Preg_match() Preg_split()
Copyright Š 2018, edureka and/or its affiliates. All rights reserved.
02
01 Basic level
Advance level
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
36 What is the main difference between asp.net & PHP?
PHP is a programming language whereas ASP.NET is a programming
framework. Websites developed by ASP.NET may use C#, but also other
languages such as J#. ASP.NET is compiled whereas PHP is interpreted.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
37 What is the use of Session & Cookie in PHP?
A session is a global variable stored on
the server. Each session is assigned a
unique id which is used to retrieve
stored values. Sessions have the
capacity to store relatively large data
compared to cookies.
A
Create a Cookie
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
37 What is the use of Session & Cookie in PHP?
A session is a global variable stored on
the server. Each session is assigned a
unique id which is used to retrieve
stored values. Sessions have the
capacity to store relatively large data
compared to cookies.
A
Start a Session
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
38 What is overriding & overloading in PHP?
Overloading is defining functions that have similar signatures, yet havedifferent
parameters. Overriding is only pertinent to derived classes, where the parent
class has defined a method and the derived class wishes to overridethat method.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
39 What is the use of the header() in PHP?
It is used to redirect from one page to another
It is used to send an HTTP status code
It is used to send a raw HTTP header
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
40 What is the difference between $message & $$message?
They are both variables. But $message is a variable with a fixed
name. $$message is a variable whose name is stored in $message.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
41 How can we create a database using PHP & MySQL?
• Establish a connection to MySQL server from your PHP script.
• If the connection is successful, write a SQL query to create
a database and store it in a string variable.
• Execute the query.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
42 What is GET & POST method in PHP?
The GET method sends
the encoded user information
appended to the page request.
The page and the encoded
information are separated by
the ? character.
The POST method transfers
information via HTTP headers.
The information is encoded as
described in case of GET
method and put into a header
calledQUERY_STRING.
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
43 What is the difference between GET & POST?
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
44 What is the use of Callback in PHP?
PHP callback are functions that may be
called dynamically by PHP. They are
used by native functions such
as array_map, usort,
preg_replace_callback, etc.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
45 What is a lambda function in PHP?
A lambda function is an anonymous PHP function that can be stored in a
variable and passed as an argument to other functions or methods.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
46 What are PHP Magic methods/functions?
In PHP all functions starting with __ names are magical
functions/methods. These methods, identified by a two underscore
prefix (__), function as interceptors that are automatically called when
certain conditions are met.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
47 How can you encrypt password using PHP?
The crypt () function is used to create one way encryption. It takes one input
string and one optional parameter. The function is defined as: crypt (input_string,
salt), where input_string consists of the string that has to be encrypted and salt is
an optional parameter.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
48 How to connect to a URL in PHP?
PHP provides a library called cURL that may already be included in the
installation of PHP by default. cURL stands for client URL, and it allows you to
connect to a URL
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
49 What is Type hinting in PHP?
Type hinting is used to specify the expected
data type of an argument in a function
declaration. When you call the function, PHP
will check whether or not the arguments are
of the specified type.
A
PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
PHP Interview Questions
50 What is the difference between runtime exception & compile time
exception?
An exception that occurs at compile time is called a checked exception. This exception
cannot be ignored and must be handled carefully. For example, if you
use FileReader class to read data from the file and the file specified in class
constructor does not exist, then a FileNotFoundException occurs and you will have to
manage that exception.
A
YouTube Video Link in the Description
PHP Interview Questions and Answers | Edureka

Weitere ähnliche Inhalte

Was ist angesagt?

Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1team11vgnt
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first courseVlad Posea
 
PHP Presentation
PHP PresentationPHP Presentation
PHP PresentationJIGAR MAKHIJA
 
Operators php
Operators phpOperators php
Operators phpChandni Pm
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1Kumar S
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Gheyath M. Othman
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to phpAnjan Banda
 
Php oop presentation
Php   oop presentationPhp   oop presentation
Php oop presentationMutinda Boniface
 
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...Simplilearn
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in phpCPD INDIA
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1warda aziz
 
Basic of PHP
Basic of PHPBasic of PHP
Basic of PHPNisa Soomro
 

Was ist angesagt? (20)

Php Unit 1
Php Unit 1Php Unit 1
Php Unit 1
 
Introduction to Web Programming - first course
Introduction to Web Programming - first courseIntroduction to Web Programming - first course
Introduction to Web Programming - first course
 
Xampp Workshop
Xampp WorkshopXampp Workshop
Xampp Workshop
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Operators php
Operators phpOperators php
Operators php
 
Ajax
AjaxAjax
Ajax
 
ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1ASP.NET Tutorial - Presentation 1
ASP.NET Tutorial - Presentation 1
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php oop presentation
Php   oop presentationPhp   oop presentation
Php oop presentation
 
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...
Apache Spark Architecture | Apache Spark Architecture Explained | Apache Spar...
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
Assembly Langauge Chap 1
Assembly Langauge Chap 1Assembly Langauge Chap 1
Assembly Langauge Chap 1
 
Php
PhpPhp
Php
 
Basic of PHP
Basic of PHPBasic of PHP
Basic of PHP
 
Php basics
Php basicsPhp basics
Php basics
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Operators in PHP
Operators in PHPOperators in PHP
Operators in PHP
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
Php
PhpPhp
Php
 

Ähnlich wie PHP Interview Questions and Answers | Edureka

PHP Variables & Comments 01
PHP Variables & Comments 01PHP Variables & Comments 01
PHP Variables & Comments 01Spy Seat
 
PHP/MySQL Training Course in Delhi, India by IT People
PHP/MySQL Training Course in Delhi, India by IT PeoplePHP/MySQL Training Course in Delhi, India by IT People
PHP/MySQL Training Course in Delhi, India by IT PeopleAbhishekve
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptxalehegn9
 
Extensiones In PHP
Extensiones In PHPExtensiones In PHP
Extensiones In PHPRoberto Bermejo
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanphp2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabadphp2ranjan
 
PHP Interview Questions-ppt
PHP Interview Questions-pptPHP Interview Questions-ppt
PHP Interview Questions-pptMayank Kumar
 
Chap 4 PHP.pdf
Chap 4 PHP.pdfChap 4 PHP.pdf
Chap 4 PHP.pdfHASENSEID
 
Oop's in php
Oop's in php Oop's in php
Oop's in php umesh patil
 
Start using PHP 7
Start using PHP 7Start using PHP 7
Start using PHP 7Oscar Merida
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018AshokKumar3319
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 
PHP Interview Questions
PHP Interview QuestionsPHP Interview Questions
PHP Interview QuestionsMaryamAnwar10
 
501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdfAkashGohil10
 
PHP Basics Ebook
PHP Basics EbookPHP Basics Ebook
PHP Basics EbookSwanand Pol
 
Php Interview Questions
Php Interview QuestionsPhp Interview Questions
Php Interview QuestionsUmeshSingh159
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolmentRajib Ahmed
 

Ähnlich wie PHP Interview Questions and Answers | Edureka (20)

PHP Variables & Comments 01
PHP Variables & Comments 01PHP Variables & Comments 01
PHP Variables & Comments 01
 
PHP/MySQL Training Course in Delhi, India by IT People
PHP/MySQL Training Course in Delhi, India by IT PeoplePHP/MySQL Training Course in Delhi, India by IT People
PHP/MySQL Training Course in Delhi, India by IT People
 
chapter Two Server-side Script lang.pptx
chapter  Two Server-side Script lang.pptxchapter  Two Server-side Script lang.pptx
chapter Two Server-side Script lang.pptx
 
Extensiones In PHP
Extensiones In PHPExtensiones In PHP
Extensiones In PHP
 
Php mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjanPhp mysql-training online-by_php2ranjan
Php mysql-training online-by_php2ranjan
 
php training in hyderabad
php training in hyderabadphp training in hyderabad
php training in hyderabad
 
PHP Interview Questions-ppt
PHP Interview Questions-pptPHP Interview Questions-ppt
PHP Interview Questions-ppt
 
Chap 4 PHP.pdf
Chap 4 PHP.pdfChap 4 PHP.pdf
Chap 4 PHP.pdf
 
Oop's in php
Oop's in php Oop's in php
Oop's in php
 
Start using PHP 7
Start using PHP 7Start using PHP 7
Start using PHP 7
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
PHP Interview Questions
PHP Interview QuestionsPHP Interview Questions
PHP Interview Questions
 
501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf501 - PHP MYSQL.pdf
501 - PHP MYSQL.pdf
 
Php training
Php trainingPhp training
Php training
 
PHP Basics Ebook
PHP Basics EbookPHP Basics Ebook
PHP Basics Ebook
 
phptutorial
phptutorialphptutorial
phptutorial
 
phptutorial
phptutorialphptutorial
phptutorial
 
Php Interview Questions
Php Interview QuestionsPhp Interview Questions
Php Interview Questions
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 

Mehr von Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaEdureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 

Mehr von Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

KĂźrzlich hochgeladen

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

KĂźrzlich hochgeladen (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

PHP Interview Questions and Answers | Edureka

  • 1. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced
  • 2. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced Agenda ❖ History of PHP ❖ Salary Trends ❖ Companies using PHP ❖ PHP basic level interview Questions ❖ PHP Advance level interview Questions
  • 3. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced History of PHP Created in 1994 by Rasmus Lerdorf In June of 1995, Rasmus released the source code for PHP Tools to the public In April 1996 Rasmus introduced PHP/FI In June, PHP/FI was given a version 2.0 status In November, 1997, the underlying parsing engine was already being entirely rewritten.
  • 4. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Salary Trend
  • 5. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced Companies using PHP
  • 6. Copyright Š 2018, edureka and/or its affiliates. All rights reserved. 02 01 Basic level Advance level
  • 7. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 01 What are the common uses of PHP? 01 02 03 04 05 It performs system functions It can handle forms It can modify elements within the database It can Access cookies variables It can restrict users to access pages
  • 8. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 02 What is PEAR in PHP? PEAR is a framework and repository for reusable PHP components. It stands for PHP Extension and Application Repository. A
  • 9. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 03 What is the difference between static and dynamic websites? Static Websites Dynamic Websites In static websites, content can't be changed after running the script. In dynamic websites, content of script can be changed at the run time.
  • 10. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 04 How to execute a PHP script from the command line? To execute a PHP script, use the PHP Command Line Interface (CLI) and specify the file name of the script A
  • 11. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 05 Is PHP a case-sensitive language? PHP is partially case sensitive. The variable names are case-sensitive but function names are not. A
  • 12. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 06 What is the meaning of 'escaping to PHP'? The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as 'escaping to PHP'. A
  • 13. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 07 What are the characteristics of PHP variables? 01 02 03 04 05 06 Denoted with a dollar ($) sign Variable is the value of its most recent assignment Variables are assigned with the = operator Variables need not be declared before assignment Variables in PHP do not have intrinsic types Variables used before they are assigned have default values
  • 14. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 08 What are the different types of PHP variables? 2 31 4 5 6 7 8 Integers Doubles Boolean Null Strings Arrays Objects Resources
  • 15. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 09 What are the rules for naming a PHP variable? 01 02 Must begin with a letter or underscore character Cannot use characters like + , - , % , ( , ) . &
  • 16. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 10 What are the rules to determine the "truth" of any value which is not already of the Boolean type? 01 02 03 04 05 06 It is false if exactly equal to zero and true otherwise. It is false if the string is empty and true otherwise. Values of Type Null are always False. Array is false if it contains no values and true otherwise. Valid resources are true. Don’t use doubles as Booleans.
  • 17. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 11 What is NULL? NULL is a special data type which can have only one value. A variable of data type NULL is a variable that has no value assigned to it. A
  • 18. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 12 How do you define a constant in PHP? To define a constant you have to use define() function and to retrieve the value of a constant, you have to simply specifying its name. A
  • 19. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 13 What is the purpose of constant() function ? The constant() function will return the value of the constant. A
  • 20. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 14 What are the differences between PHP constants & variables ? VariablesConstants •No dollar ($) sign required •Defined using define() function •Defined and accessed anywhere •Cannot be redefined or undefined •Must be written with dollar ($) sign •Defined by simple assignment •Functions can create and access variables within own scope •Can be redefined for each path individually
  • 21. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 15 Name some of the constants in PHP and their purpose. It represents the full path and filename of the file. It returns the class name as it was declared. It represents the class method name. It represents the function name. It represents the current line number of the file. __LINE__ __FILE__ __FUNCTION__ __CLASS__ __METHOD__
  • 22. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 16 What is the purpose of break & continue statement? Break - It terminates the for loop or switch statement and transfers execution to the statement immediately following the for loop or switch. Continue - It causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating. A
  • 23. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 17 What are the two most common ways to start & finish a PHP code block? 01 02
  • 24. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 18 What is the difference between PHP4 & PHP5? PHP5PHP4 •Construct & Class have same name. •Passed by value •Does not declare class as abstract •Does not have static methods & properties in class •Contructors are named _construct & destructors as _destruct •Passed by reference •Allows to declare a class as abstract •Allows to have static methods & properties in class.
  • 25. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 19 What is the meaning of a final class and a final method? The final keyword in a method declaration indicates that the method cannot be overridden by subclasses. A class that is declared final cannot be subclassed. This is particularly useful when we are creating an immutable class like the String class. A
  • 26. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 20 How can PHP and JavaScript interact? PHP and Javascript cannot directly interact since PHP is a server side language and Javascript is a client-sidelanguage. A
  • 27. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 21 How can PHP and HTML interact? It is possible to generate HTML through PHP scripts, and it is possible to pass pieces of information from HTML to PHP. A
  • 28. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 22 How can you compare objects in PHP? We use the operator ‘==’ to test if two objects are instanced from the same class and have same attributes and equal values. We can also test if two objects are referring to the same instance of the same class by the use of the identity operator ‘===’. A
  • 29. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 23 Name some of the popular frameworks in PHP. CakePHP CodeIgniter Yii 2 Symfony Zend Framework
  • 30. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 24 What are the data types in PHP? 2 31 4 5 6 7 8 Integers Float Boolean Null Strings Arrays Objects Resources 9 Callable
  • 31. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 25 What are Constructor & Destructor in PHP? PHP constructor and destructor are special type functions which are automatically called when a PHP class object iscreated and destroyed. A
  • 32. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 26 What are include() and require() functions? Include – It is used to put data of one PHP file into another PHP file. Require - If there are any errors then the require() function produces a warning and a fatal error and stops the execution of the script. A
  • 33. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 27 What is the main difference between require() & require_once()? • The require() includes and evaluates a specific file, while require_once() does that only if it has not been included before. • The require_once() statement can be used to include a php file in another one, when you may need to include the called file more than once. • So, require_once() is recommended to use when you want to include a file where you have a lot of functions. A
  • 34. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 28 What are the different types of errors available in PHP? E_ERROR E_WARNING E_PARSE E_NOTICE E_CORE_ERRORE_CORE_WARNINGE_COMPILE_ERRORE_USER_ERROR E_USER_WARNING E_USER_NOTICE E_STRICT E_ALL 01 02 03 04 08 07 06 05 09 10 11 12
  • 35. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 29 Explain the syntax for ‘foreach’ loop with example. The foreach statement is used to loop through arrays. A
  • 36. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 30 What are the different types of Arrays in PHP? Indexed Array01 Associative Array02 Multidimensional Array03
  • 37. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 31 What is the difference between single quoted and double quoted string? Singly quoted strings are treated almost literally, whereas doubly quoted strings replace variables with their values as well as specially interpreting certain character sequences. A
  • 38. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 32 How to concatenate two strings in PHP? To concatenate two string variables together, we use the dot (.) operator A
  • 39. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 33 How is it possible to set an infinite execution time for PHP script? The set_time_limit(0) added at the beginning of a script sets to infinite the time of execution to not have the PHP error ‘maximum execution time exceeded.’ A
  • 40. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 34 What is the difference between “echo” and “print” in PHP? • PHP echo output one or more string.Whereas, PHPprint output a string. • Echo can output one or more string but print can only output one string and always returns 1. • Echo is faster than print because it does not return any value. A
  • 41. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 35 Name some of the functions in PHP. ereg() Split() Preg_match() Preg_split()
  • 42. Copyright Š 2018, edureka and/or its affiliates. All rights reserved. 02 01 Basic level Advance level
  • 43. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 36 What is the main difference between asp.net & PHP? PHP is a programming language whereas ASP.NET is a programming framework. Websites developed by ASP.NET may use C#, but also other languages such as J#. ASP.NET is compiled whereas PHP is interpreted. A
  • 44. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 37 What is the use of Session & Cookie in PHP? A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Sessions have the capacity to store relatively large data compared to cookies. A Create a Cookie
  • 45. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 37 What is the use of Session & Cookie in PHP? A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Sessions have the capacity to store relatively large data compared to cookies. A Start a Session
  • 46. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 38 What is overriding & overloading in PHP? Overloading is defining functions that have similar signatures, yet havedifferent parameters. Overriding is only pertinent to derived classes, where the parent class has defined a method and the derived class wishes to overridethat method. A
  • 47. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 39 What is the use of the header() in PHP? It is used to redirect from one page to another It is used to send an HTTP status code It is used to send a raw HTTP header
  • 48. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 40 What is the difference between $message & $$message? They are both variables. But $message is a variable with a fixed name. $$message is a variable whose name is stored in $message. A
  • 49. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 41 How can we create a database using PHP & MySQL? • Establish a connection to MySQL server from your PHP script. • If the connection is successful, write a SQL query to create a database and store it in a string variable. • Execute the query. A
  • 50. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 42 What is GET & POST method in PHP? The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ? character. The POST method transfers information via HTTP headers. The information is encoded as described in case of GET method and put into a header calledQUERY_STRING.
  • 51. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 43 What is the difference between GET & POST?
  • 52. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 44 What is the use of Callback in PHP? PHP callback are functions that may be called dynamically by PHP. They are used by native functions such as array_map, usort, preg_replace_callback, etc. A
  • 53. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 45 What is a lambda function in PHP? A lambda function is an anonymous PHP function that can be stored in a variable and passed as an argument to other functions or methods. A
  • 54. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 46 What are PHP Magic methods/functions? In PHP all functions starting with __ names are magical functions/methods. These methods, identified by a two underscore prefix (__), function as interceptors that are automatically called when certain conditions are met. A
  • 55. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 47 How can you encrypt password using PHP? The crypt () function is used to create one way encryption. It takes one input string and one optional parameter. The function is defined as: crypt (input_string, salt), where input_string consists of the string that has to be encrypted and salt is an optional parameter. A
  • 56. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 48 How to connect to a URL in PHP? PHP provides a library called cURL that may already be included in the installation of PHP by default. cURL stands for client URL, and it allows you to connect to a URL A
  • 57. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 49 What is Type hinting in PHP? Type hinting is used to specify the expected data type of an argument in a function declaration. When you call the function, PHP will check whether or not the arguments are of the specified type. A
  • 58. PHP & MySQL CERTIFICATION TRAINING www.edureka.co/php-mysql-self-paced PHP Interview Questions 50 What is the difference between runtime exception & compile time exception? An exception that occurs at compile time is called a checked exception. This exception cannot be ignored and must be handled carefully. For example, if you use FileReader class to read data from the file and the file specified in class constructor does not exist, then a FileNotFoundException occurs and you will have to manage that exception. A
  • 59. YouTube Video Link in the Description