0% found this document useful (0 votes)
15 views

PHP Chapter 1

Introduction to PHP language

Uploaded by

Ogal Peter
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

PHP Chapter 1

Introduction to PHP language

Uploaded by

Ogal Peter
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.What is a PHP?

Hypertext Preprocessor is a widely-used open-source server-side scripting


language designed primarily for web development. It is executed on the server generating
dynamic web pages.

2. State some features of “PHP“ Language.


 Open-source and free.
 Highly scalable for both small and large applications.
 Easy to learn and use.
 Platform-independent (runs on various operating systems like Windows, Linux, MacOS).
 Supports integration with many databases (like MySQL, PostgreSQL).
 Has built-in support for handling HTML, cookies, and sessions.

3. Write names most commonly of Web Server.


 Apache HTTP Server
 Caddy
 Nginx
 Microsoft IIS (Internet Information Services)
 LiteSpeed

4. What are the reasons behind the development of PHP language?

 To make web development easier by enabling server-side scripting that can generate dynamic
content based on user input.

 To manage dynamic content and databases on websites .

5. Why we have to learn PHP programming, share your opinion?


 Extensive community support.
 Easy integration with databases.
 Compatibility with HTML and CSS.
 Wide use in content management systems.
 Flexibility for building dynamic web applications.

6. What do understand by the term “Web Server”?


A web server is software that processes requests from browsers (clients) and delivers web
pages or other content via HTTP.

7. What is xampp?
XAMPP is an open-source software package that contains Apache (web server),
MariaDB/MySQL (database), PHP (scripting language), and Perl. It provides an easy-to-use
platform for developing and testing web applications locally.

8. Define protocols?
Protocols are rules and standards that define how data is transmitted over a network.
9. What do you mean by HTTP and IP protocols?
 HTTP (HyperText Transfer Protocol): A protocol used for transmitting hypertext (HTML)
over the internet, allowing browsers to request and display web pages.
 IP (Internet Protocol): A protocol used to send data across a network, assigning unique
addresses (IP addresses) to devices to ensure data is routed correctly.

10. Explain why you do not see any PHP code when you view the source code of a
PHP page in the browser.
PHP is a server-side language, ie its code is executed on the server before the
resulting HTML is sent to the browser. As a result, the browser only receives the
output.

11. Define the term “embedded language”?


An embedded language is a language that can be inserted into another language.

12. What do you mean by scripting languages?


Scripting languages are programming languages that automate tasks or control other
applications. They are typically interpreted, not compiled, and include languages like PHP,
Python, and JavaScript.
Practical Questions.
1. Write steps of xampp installation or setup process.
 Download XAMPP from the official website
 Run the installer and follow the instructions to install it on your computer.
 Choose the components you need (Apache, MySQL, PHP, etc.).
 Set the installation directory
 Complete the installation and start the XAMPP Control Panel.
 Use the control panel to start Apache and MySQL.

2. Write PHP code to display your Roll Number, Course Name and
Technology Name on the browser.
<?php
$roll_number = "12345";
$course_name = "Computer Science";
$technology_name = "PHP";

echo "Roll Number: " . $roll_number . "<br>";


echo "Course Name: " . $course_name . "<br>";
echo "Technology Name: " . $technology_name . "<br>";
?>
Objective and MCQs:
1. What is the default extension that most Web server uses to process
PHP script? .php
a) .html
b) .php
c) .xhtml
d) .ini
2. Who is invented of PHP language? Rasmus Lerdorf
a) Denis Retchie
b) Rasmus Lerdorf
c) John Baker
d) Andi Gutmans
3. Latest version of PHP 7.3
a) 4.0
b) 5.0
c) 7.3
d) 7.0
4. Abbreviation of URL Uniform Resource Locator
a) Unified Resource location
b) Uni Resource locator
c) Uniform Resource Locator
d) United form locator

5. CGI stand for Common Gateway Interface

a) Common Gateway Interface


b) Command Gateway interface
c) Circle Gate interface
d) Common Gate interface

6. PHP 7 version was developed. 2014


a) 1995
b) 1999
c) 2014
d) 2018

7. The first version released of Apache. 1995


a) 1990
b) 1992
c) 1995
d) 1999

8. Web Server acts as a middleman between the Server and Client machines.
a) Server and Browser
b) Server and Client machines.
c) Browser and Client.
d) Client to Client.

9. The apache official name is Apache HTTP Server.


a) Apache HTTP Server.
b) Apache Foundation
c) Apache Server
d) Apache Software Foundation.
10. WAMPP stand for Window, Apache, MariaDB/MySQL, PHP and Perl

a) Linux, Apache, MariaDB/MySQL, PHP and Perl


b) Window, Apache, MariaDB/MySQL, PHP and Perl
c) Macintosh, Apache, MariaDB/MySQL, PHP and Perl
d) None all above.
11. PHP, originally derived from Personal Home Page

a) Preprocessor Hyper Text Programming.


b) Personal Home Program
c) Personal Home Page
d) Hypertext preprocessor
12. PHP, program file save normally in _htdocs_______ folder of Xampp environment
a) www
b) temp
c) php
d) htdocs

You might also like