Find Interview Questions for Top Companies
Ques:- what is the abbrevation of PHP?
Asked In :-
Right Answer:
PHP stands for "PHP: Hypertext Preprocessor."
Comments
Admin May 17, 2020

According to Wrox Press - Professional programming PHP the
First meaning of PHP is "Personal Home Page".Later it was
PHP Hypertext Processor

Admin May 17, 2020

Acronym PHP : PHP Hypertext Processor.
PHP is a Powerful webbased scripting language .. serverside

Ques:- What’s the diff. between include() and Include_once().
Asked In :-
Comments
Admin May 17, 2020

The documentation below also applies to require(). The two
constructs are identical in every way except how they handle
failure. They both produce a Warning, but require() results
in a Fatal Error. In other words, use require() if you want
a missing file to halt processing of the page. include()
does not behave this way, the script will continue
regardless. Be sure to have an appropriate include_path
setting as well. Be warned that parse error in included file
doesn't cause processing halting in PHP versions prior to
PHP 4.3.5. Since this version, it does.
Files for including are first looked for in each
include_path entry relative to the current working
directory, and then in the directory of current script. E.g.
if your include_path is libraries, current working directory
is /www/, you included include/a.php and there is include
"b.php" in that file, b.php is first looked in
/www/libraries/ and then in /www/include/. If filename
begins with ./ or ../, it is looked for only in the current
working directory or parent of the current working
directory, respectively.
When a file is included, the code it contains inherits the
variable scope of the line on which the include occurs. Any
variables available at that line in the calling file will be
available within the called file, from that point forward.
However, all functions and classes defined in the included
file have the global scope.
Example #1 Basic include() example
vars.php
<?php
$color = 'green';
$fruit = 'apple';
?>
test.php
<?php
echo "A $color $fruit"; // A
include 'vars.php';
echo "A $color $fruit"; // A green apple
?>
********and in include_once is as below**********
he include_once() statement includes and evaluates the
specified file during the execution of the script. This is a
behavior similar to the include() statement, with the only
difference being that if the code from a file has already
been included, it will not be included again. As the name
suggests, it will be included just once.
include_once() may be used in cases where the same file
might be included and evaluated more than once during a
particular execution of a script, so in this case it may
help avoid problems such as function redefinitions, variable
value reassignments, etc.
for example::>
include_once() with a case insensitive OS in PHP 4
<?php
include_once "a.php"; // this will include a.php
include_once "A.php"; // this will include a.php again! (PHP
4 only)
?>

Admin May 17, 2020

include includes the called file as many times as you call
include and include_once calls only once

Ques:- Use of Session
Asked In :-
Right Answer:
Sessions in PHP are used to store user data across multiple pages. They allow you to maintain state and keep track of user information, such as login status or preferences, during a user's visit to a website.
Comments
Admin May 17, 2020

A PHP session variable is used to store information about,
or change settings for a user session. Session variables
hold information about one single user, and are available
to all pages in one application

Admin May 17, 2020

Session variable helpus to check the user is correct
authentified one when he/she visit each pages

Ques:- how can we check mail function with ‘127.0.0.1’ (before submitting a site?
Asked In :-
Comments
Admin May 17, 2020

i think we can give this ip address as first argument of
mail function, coz the first argument of mail function need
a address to send mail, so it can be used there.
am not dead sure about my answer, if anyone find it true or
false then please let me know at my email

Ques:- What is meant by content management system?
Asked In :-
Right Answer:
A content management system (CMS) is a software application that allows users to create, manage, and modify digital content on a website without needing specialized technical knowledge.
Comments
Admin May 17, 2020

A Content Management System ( CMS ) is used to add, edit,
and delete content on a website. For a small website, such
as this, adding and deleting a page manually is fairly
simple. But for a large website with lots of pages like a
news website adding a page manually without a content
management system can be a headache.
A CMS is meant to ease the process of adding and modifying
new content to a webpage. The pages content are stored in
database, not in the file server.
This tutorial will present an example of a simple content
management system. You will be able to add, edit and delete
articles using HTML forms.
For the database table we'll call it the news table. It
consist of three columns :
* id : The article's id
* title : The title of an article
* content : The article itself

Admin May 17, 2020

Content Management System (CMS) is a dynamically change the
content in a page. Administrator have a full control to do
this dynamically changes add, edit, delete, move up/down and
etc...

Ques:- How to link one site backend to another site frontend?
Asked In :-
Right Answer:
To link one site's backend to another site's frontend, you can use APIs (Application Programming Interfaces). The backend site should expose RESTful or GraphQL APIs that the frontend site can call to retrieve or send data. Use HTTP requests (GET, POST, etc.) from the frontend to interact with the backend, ensuring proper authentication and data handling.
Ques:- How can we upload a php + mysql Site
Asked In :-
Right Answer:
To upload a PHP + MySQL site, follow these steps:

1. **Prepare Files**: Ensure all your PHP files and assets are ready for upload.
2. **Choose a Hosting Provider**: Select a web hosting service that supports PHP and MySQL.
3. **Upload Files**: Use an FTP client (like FileZilla) to upload your PHP files to the server's public directory (usually `public_html`).
4. **Create Database**: Log in to your hosting control panel (like cPanel) and create a new MySQL database and user.
5. **Import Database**: Use phpMyAdmin or a similar tool to import your local database (SQL file) into the newly created database.
6. **Configure Database Connection**: Update your PHP files to connect to the new database using the new database name, user, and password.
7. **Test the Site**: Access your site through a web browser to ensure everything is working correctly.
Comments
Admin May 17, 2020

Use FTP to upload php files (script)
Create database in Mysql server.

Ques:- what are the basic steps to installation php4+mysql4+phpmyadmin on IIS web server?. Pls write the complete steps.
Asked In :-
Right Answer:
1. **Install IIS**: Ensure that Internet Information Services (IIS) is installed on your Windows machine.

2. **Download PHP**: Go to the official PHP website and download the PHP 4 version compatible with your system.

3. **Extract PHP**: Unzip the downloaded PHP files to a directory, e.g., `C:PHP`.

4. **Configure PHP**:
- Rename `php.ini-dist` to `php.ini` in the PHP directory.
- Edit `php.ini` to enable necessary extensions (e.g., `extension=php_mysql.dll`).

5. **Add PHP to PATH**:
- Right-click on 'This PC' > Properties > Advanced system settings > Environment Variables.
- Under 'System variables', find 'Path' and add `C:PHP`.

6. **Configure IIS to use PHP**:
- Open IIS Manager.
- Select your website, then click on 'Handler Mappings'.
Comments
Admin May 17, 2020

ISAPI mode. If you are going to install PHP in an ISAPI
mode, be aware that you must copy some DLL files to get PHP
to function correctly. PHP uses several DLLs, such as the
PHP4TS.dll file and DLL files in both the DLL and
extensions folders. I will cover DLLs in the extensions
folder later in this article. For now, you must work with
the PHP4TS.dll file and DLL folder files. Use the following
steps.
You must make the files available to the ISAPI module. I
recommend that you copy the files into the
C:WINNTSYSTEM32 folder. While you may copy the files into
the C:PHPSAPI folder, putting the files in the
C:WINNTSYSTEM32 folder is preferable.
Open the Microsoft Management Console (MMC) for IIS web
server for your selected web server and website. (The same
options apply here as in the CGI installation listed
above).
Open the Properties dialog box, select the ISAPI tab, and
select Add.
In Filter Name, add the name of the ISAPI filter. (For this
article, I entered: “PHP”.)
In the Executable field, either use Browse or type the path
to C:PHPSAPIPHPISAPI.dll
You should see the following:
4-Click the OK button and select the Home Directory tab and
the Configuration button. The procedure here is identical
to the CGI installation listed above.
In the Executable, use Browse or type the path to your PHP
folder and the PHP4ISAPI.dll file (for this article, it is
C:PHPSAPIPHP4ISAPI.dll).
In the Extension type, enter the file extension that the
server should use to refer to PHP scripts (this is most
commonly the .php extension).
You should see the following:
Click OK, Apply, and OK to complete the settings.
Stop and restart the web server. To do this, use the
Services utility in Control Panel within Administrative
Tools (Start > Programs > Administrative Tools > Services
or Start > Settings > Control Panel > Administrative Tools
> Services). Then right click the IIS Admin Service and
select Restart. You may also use the Command console to
start/stop the web server, as follows:
To stop the web sever enter: Net stop iisadmin
To restart the web server enter: Net start w3svc
When the web service has restarted, open the ISAPI tab as
described in steps 2 and 3 above.
Ensure that the ISAPI has loaded correctly. The ISAPI
should be green, not red; red indicates that the ISAPI has
failed to load. If the ISAPI has not loaded correctly,
ensure that your paths to the ISAPI files are correct and
that you copied the DLL files into the correct locations.
If the ISAPI loads correctly, you are ready to test your
PHP installation.

Admin May 17, 2020

in above exmple first u should get ISAPI file from PHP
afterwards that will work with IIS server

Ques:- is ‘easyphp’ is compelete technology to design a phpmysql site?
Asked In :-
Comments
Admin May 17, 2020

Yes,easyphp include webserver,php and mysql

Admin May 17, 2020

That is one kind of packet about 3 combinition. for example
included Apacee Server/Mysql/and php. so it is easyer for
instalment

Ques:- PHP can be used frontend of for backend?
Asked In :-
Right Answer:
PHP is primarily used for backend development.
Comments
Admin May 17, 2020

there are three tier application
1--first tier Client "Request"
2--second tier Web server or PHP "Response from Back end or third tier"
3--third tier Mysql or BackEnd Database

Admin May 17, 2020

php can we used for backend it is the server side programmiing executrd in the server side

Ques:- What is indexing how many types?
Asked In :- GeoTech Infoservices,
Right Answer:
Indexing is a data structure technique used to quickly locate and access the data in a database table. There are two main types of indexing:

1. **Single-column Index**: An index on a single column of a table.
2. **Composite Index**: An index on multiple columns of a table.

Additionally, there are other types like unique indexes, full-text indexes, and spatial indexes.
Comments
Admin May 17, 2020

Indexing is a technique to add or search for particular data
from database.
Regarding the types of indexing I'm a little confused coz
i dint find 32 types but a few of them are:
. primary key index:
.unique index
.bitmap index
.hash index
.function based index
.Virtual index
. Binary Search style indexing
. B-tree indexing
. Inverted list indexing
. Memory List indexing
. Table indexing
and/or
>clustured
>unclustured

Admin May 17, 2020

Indexing is use to improve the performance of database. it
has 32 types of indexing in each table

Ques:- What is The difference between ‘ and ” where they can ben in between or outmost and how
Asked In :-
Comments
Admin May 17, 2020

variables and escape sequences for special characters will
not be expanded when they occur in single quoted strings.
E.G.
$var = 10;
//if we type
echo "$var"; // output : 10
echo '$var'; // output : $var
echo "nabc"; //output: abc
echo 'nabc' //output :nabc

Admin May 17, 2020

variables within "" are evaluated where as variables within
'' are printed as it is, and execution of '' based statement
are faster when compared to ""

Ques:- PHP serverside scripting language or client side scripting language>
Asked In :-
Right Answer:
PHP is a server-side scripting language.
Comments
Admin May 17, 2020

PHP is a serverside scripting language.

Admin May 17, 2020

php-server side scripting language

Ques:- What is the substitution of submit in PHP?
Asked In :-
Right Answer:
In PHP, the substitution for "submit" is typically the "POST" or "GET" method used in forms to send data to the server.
Comments
Admin May 17, 2020

To my knowledge, header function won't submit the page.
Please clarify.

Ques:- Is PHP is procedure oriented or object oriented?
Asked In :-
Right Answer:
PHP is both procedure-oriented and object-oriented.
Comments
Admin May 17, 2020

php is a hybrid language which has got both procedure and
oop concepts.
so you can take it in any way

Admin May 17, 2020

PHP is Both Procedure oriented and Object Oriented.
We have the choice of using procedural programming or object
oriented programming, or a mixture of them.
Although not every standard OOP feature is implemented in
PHP 4, many code libraries and large applications (including
the PEAR library) are written only using OOP code.
PHP 5 fixes the OOP related weaknesses of PHP 4, and
introduces a complete object model.
Thanks.

Ques:- What is the use of paypal in the e-commerece website?
Asked In :-
Right Answer:
PayPal is used in e-commerce websites to facilitate secure online payments, allowing customers to make purchases using their PayPal accounts or credit/debit cards without sharing their financial information directly with the merchant.
Comments
Admin May 17, 2020

To allow our customers pay the shopping cart bill online,
All the creditcard validation can be done by paypal people.

Admin May 17, 2020

paypal is an payment gateway site,any one have pay the
amount using creditcard via paypal.

Ques:- How can I embed a java programme in PHP file and what changes have to be done in PHP.ini file?
Asked In :-
Right Answer:
To embed a Java program in a PHP file, you can use the `exec()` function in PHP to call the Java program from the command line. Ensure that the Java executable is in your system's PATH.

In the `php.ini` file, you may need to adjust the `disable_functions` directive to ensure that `exec()` is not disabled. Additionally, ensure that the `safe_mode` is turned off if it is enabled, as it can restrict the execution of external programs.
Comments
Admin May 17, 2020

There are two possible ways to bridge PHP and Java: you can
either integrate PHP into a Java Servlet environment, which
is the more stable and efficient solution, or integrate Java
support into PHP. The former is provided by a SAPI module
that interfaces with the Servlet server, the latter by this
Java extension.
The Java extension provides a simple and effective means for
creating and invoking methods on Java objects from PHP. The
JVM is created using JNI, and everything runs in-process.
Example Code:
getProperty('java.version') . ''; echo 'Java vendor=' .
$system->getProperty('java.vendor') . ''; echo 'OS=' .
$system->getProperty('os.name') . ' ' .
$system->getProperty('os.version') . ' on ' .
$system->getProperty('os.arch') . ' '; // java.util.Date
example $formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz"); echo
$formatter->format(new Java('java.util.Date')); ?>
The behaviour of these functions is affected by settings in
php.ini.
Table 1. Java configuration options
Name
Default
Changeable
java.class.path
NULL
PHP_INI_ALL
Name Default Changeable
java.home
NULL
PHP_INI_ALL
java.library.path
NULL
PHP_INI_ALL
java.library
JAVALIB
PHP_INI_ALL

Ques:- How can I find what type of images that the PHP version supports?
Asked In :-
Right Answer:
You can find out what types of images the PHP version supports by using the `gd_info()` function. This function returns an array with information about the GD library, including supported image formats like JPEG, PNG, and GIF.
Comments
Admin May 17, 2020

Use function phpinfo() and you will get all detail regarding
your server as well as domain.

Ques:- what is DDL and DML?
Asked In :- voodoo.io,
Right Answer:
DDL (Data Definition Language) is used to define and manage database structures, such as creating, altering, and deleting tables. DML (Data Manipulation Language) is used to manipulate and manage data within those structures, such as inserting, updating, and deleting records.
Comments
Admin May 17, 2020

Data Definition Language - DDL
Data Manipulation Language - DML

Admin May 17, 2020

DDL, DML and DCL are types of SQL commands
DDL: Data Definition Language.
DML: Data Manipulation Language.
DCL: Data Control Language.
DDL is used to CREATE, ALTER OR DROP the database objects
(Table, Views, Users).
DML is used to manipulate with the existing data in the
database objects.(insert, update, delete)
DCL is used to control the database transaction. Examples:
Grant and Revoke (In Oracle).

Ques:- Explain about Type Juggling in PHP?
Asked In :-
Right Answer:
Type juggling in PHP refers to the automatic conversion of variable types when performing operations. PHP is a loosely typed language, meaning it can change the type of a variable based on the context. For example, if you add a string to an integer, PHP will convert the string to a number before performing the addition. This behavior allows for flexibility but can lead to unexpected results if not carefully managed.
Comments
Admin May 17, 2020

In PHP there is no need to declare the variable with
explicit type declaration. Variable type is specify by the
context.
For example, if we assign the integer value into variable,it
will be integer variable and if we assign the string value
into variable it will be string.
Example:
--------
<?php
$a=10;
$b="string";
echo "$a"; // 10
echo "$b"; // String
?>
If we want to force the variable type into different type we
can do the type casting.
Type casting example:
---------------------
<?php
$one = 10; // $one is an integer
$two = (boolean) $one; // $two is a boolean
?>
In PHP we are having function called settype() for setting
the particular variable type.
settype() example:
------------------
<?php
$first = "10rose"; // string
$second = true; // boolean
settype($first, "integer"); // $first is now 10 (integer)
settype($second, "string"); // $second is now "1" (string)
?>

Admin May 17, 2020

Type Juggling
PHP does not require (or support) explicit type definition
in variable declaration; a variable's type is determined by
the context in which that variable is used. That is to say,
if you assign a string value to variable $var, $var becomes
a string. If you then assign an integer value to $var, it
becomes an integer.
An example of PHP's automatic type conversion is the
addition operator '+'. If any of the operands is a float,
then all operands are evaluated as floats, and the result
will be a float. Otherwise, the operands will be
interpreted as integers, and the result will also be an
integer. Note that this does NOT change the types of the
operands themselves; the only change is in how the operands
are evaluated.
<?php
$foo = "0"; // $foo is string (ASCII 48)
$foo += 2; // $foo is now an integer (2)
$foo = $foo + 1.3; // $foo is now a float (3.3)
$foo = 5 + "10 Little Piggies"; // $foo is integer (15)
$foo = 5 + "10 Small Pigs"; // $foo is integer (15)
?>
If the last two examples above seem odd, see String
conversion to numbers.
If you wish to force a variable to be evaluated as a
certain type, see the section on Type casting. If you wish
to change the type of a variable, see settype().
If you would like to test any of the examples in this
section, you can use the var_dump() function.
Note: The behaviour of an automatic conversion to array is
currently undefined.
<?php
$a = "1"; // $a is a string
$a[0] = "f"; // What about string offsets? What happens?
?>
Since PHP (for historical reasons) supports indexing into
strings via offsets using the same syntax as array
indexing, the example above leads to a problem: should $a
become an array with its first element being "f", or
should "f" become the first character of the string $a?
The current versions of PHP interpret the second assignment
as a string offset identification, so $a becomes "f", the
result of this automatic conversion however should be
considered undefined. PHP 4 introduced the new curly
bracket syntax to access characters in string, use this
syntax instead of the one presented above:
<?php
$a = "abc"; // $a is a string
$a{1} = "f"; // $a is now "afc"
?>



The Core PHP category on takluu.com is designed for developers preparing for interviews that test their understanding of PHP fundamentals and server-side scripting. Core PHP forms the backbone of many web applications, enabling developers to create dynamic, interactive, and database-driven websites.

This section covers important topics such as PHP syntax, variables, data types, control structures, functions, arrays, sessions, cookies, file handling, and error handling. Additionally, it delves into working with forms, connecting to databases using MySQLi or PDO, and implementing security best practices like input validation and SQL injection prevention.

Interview questions often include practical coding problems, debugging scenarios, and explanations of how PHP interacts with the web server and databases. Understanding how to write clean, maintainable code and optimize PHP scripts for performance is also emphasized.

Candidates aspiring for roles like PHP Developer, Backend Developer, or Full Stack Developer will benefit from detailed tutorials, common interview questions, and real-world examples focused on Core PHP concepts.

At Takluu, we focus on building a strong foundation in Core PHP, enabling you to handle coding rounds confidently and develop scalable web solutions.

Whether you are a beginner or looking to refresh your PHP skills, this category provides comprehensive learning material and interview preparation tips to help you succeed.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users