[Go to site: main page, start]

0% found this document useful (0 votes)
8 views10 pages

PHP Programming Concepts and Examples

The document outlines a comprehensive PHP programming curriculum divided into five units, covering topics such as PHP basics, functions, object-oriented programming, sessions and cookies, and AJAX. Each unit contains multiple sections with questions and tasks designed to enhance understanding of PHP concepts and practical applications. The curriculum includes theoretical explanations, coding exercises, and examples to facilitate learning.

Uploaded by

kidykirres
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views10 pages

PHP Programming Concepts and Examples

The document outlines a comprehensive PHP programming curriculum divided into five units, covering topics such as PHP basics, functions, object-oriented programming, sessions and cookies, and AJAX. Each unit contains multiple sections with questions and tasks designed to enhance understanding of PHP concepts and practical applications. The curriculum includes theoretical explanations, coding exercises, and examples to facilitate learning.

Uploaded by

kidykirres
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PHP Programming

UNIT-1

Section-A

1. What is PHP most used for?

2. Is PHP a case-sensitive scripting language?

3. How is a PHP Script executed?

4. What are the types of Variables Present in PHP?

5. What are the main Characteristics of a PHP Variable?

6. What is Mean by PHP?

7. What are the Some Key Futures of PHP?

8. Expansion of OSD.

9. What is the difference between == and === operators in PHP?

10. What are the types of operators in PHP?


11. Write the correct output of the given code snippets?

<?php
$NUM1 = 3;
$NUM2 = 4;

$NUM3 = $NUM1 ** $NUM2;


echo $NUM3;
?>
12. What is mean by Array?
13. What is mean by Strings?
14. What is mean by Strings?
15. What is the purpose of for loop in PHP?

Section- B
1. List the data types used in PHP.

2. How is Type Conversion done in PHP?

3. Explain Open-Source Software.


4. Explain about Linux.

5. Explain about Apache.

6. Explain about Mozilla.

7. Write in detail about Arithmetic Operators with example.

8. Write in detail about Logical Operators.

9. Write in detail about Comparison Operators.

10. Write in detail about strings with example.

11. What is mean by Open Source Software and give me an Example.

12. Write an Example of OSD Compliant Licenses.

13. What is mean by Php? Write essentials of PHP.

14. Write a Simple Program By Using Operators.

15. Write a Simple Calculator Program in PHP Using Switch Case.

16. Write a PHP Program to check if a person is eligible for Vote using Php Functions.

17. Write a PHP Program to Create chess Board in PHP Using for loop.

Section- C
4. Describe History of Open-Source Software.

5. Explain how one can work with arrays in PHP?

6. List Some Important Characteristics of Php?

7. How do you include Comments in PHP?

8. Explain how Variables are used in PHP.

9. Give an account on Operation in PHP.

10. Write short notes on Free Software Foundation.

11. List the features of Apache.

12. Discuss the bitwise operators in PHP.

13. Explain math operators in PHP.

14. Illustrate the difference between comparison and logical operators.


15. Elaborate Loops in PHP.

16. Describe about Berkley software distribution.

17. Write a PHP code to reverse a number without using strrev() functions.

18. Write a PHP Program to check Student Grade Based on Marks using if-else statement.

19. Write a PHP Program for String handling.

20. Write a PHP Program for associative array.

UNIT-2

Section-A
1. What are functions in PHP?

2. How to create a function and write Syntax.

3. What is an Array?

4. How many types of Array in Php?

5. How to call a function in PHP?

6. Is PHP a Case-Sensitive Scripting Language?

7. How to do Multi-Line Comments in PHP?

8. What is the Purpose of the Break and Continue Statement?

9. What is mean by Indexed Array?

10. What is mean by Multidimensional Array?

11. Which programming language does PHP resemble?

13. What is the difference between "echo" and "print" in PHP?

14. What is GET and POST method in PHP?

15. What are the popular frameworks in PHP?

16. What is NULL?


17. Name and define the three scope levels available in PHP.

18. What is an image map in PHP?

19. What is image map and its types?

20. What does PEAR mean?

UNIT II

Section-B
1. How to include PHP in a Web Page?

2. Write a PHP Script to set the background colour to blue on Tuesday is given data.

3. Explain Creating functions in PHP.

4. Explain reading data from web page with a simple example.

5. Explain Browser handling Power of PHP.

6. How do you declare and initialize an array in PHP?

7. List some built in functions in PHP?

8. Write in detail about Pass by Value in PHP?

9. Write in detail about Pass by Reference in PHP?

10. Write a short note on Default Arguments in PHP?

11. What is a Conditional Statement in PHP? Write an Example.

12. What is the difference between == and === in PHP? Write an example.

13. Difference between $var and $$var in PHP.

14. Write a Factorial program in PHP using recursive function.

15. Write a PHP program to calculate area of rectangle by using function.

16. Write a PHP program by using break Keyword.


Section- C
1. Explain how to create & access the functions in PHP.

2. How lists are used in PHP? Explain with example.

3. Write short notes on arrays in PHP.

4. Discuss the get browser () function.

5. Illustrate input controls to read data in web pages.

6. Explain variable functions and nesting functions.

7. Discuss the password and hidden controls.

8. Describe about pass by value & reference with example.

9. Write in detail about Checkbox with Example.

10. Describe about Radio Buttons with example.

11. Write in detail about image Maps with example.

12. How to upload a File in PHP? Write an Example.

13. Write a PHP program to create student registration form with different controls.

14. Write a PHP program to create a form with text fields and list boxes,

15. Write a PHP program to create a form with check box and button.

UNIT III

Section-A

1. What is Object Oriented Programming (OOPs) in PHP?

2. What is the advantage of OOPs in PHP?

3. What is a Class?

4. What is an Object?

5. What are the main features of OOPs in PHP?


6. What is mean by Encapsulation?

7. What is mean by Abstraction?

8. What is Polymorphism?

9. What are some commonly used Object Oriented Programming Languages?

10. What is mean by Method Overloading?

11. What is mean by Method Overriding?

12. What different types of inheritance are there?

13. What is mean by Constructor?

14. What is mean by destructor?

15. Can we overload the constructor in a class?

16. What are access specifiers in PHP?

17. What is fopen function PHP?

18. What will the output of below code, if specified file does not exist?

<?php

echo readfile("[Link]");

?>

Section- B
1. Demonstrate the use of Constructor in PHP.

2. Create a HTML form that allows users to choose the image file they want to upload.

3. How do you create classes in PHP? Explain.

4. How will you Open and Close a file in PHP?

5. Write in detail about Overloading in Php?

6. Write in detail about Overriding in PHP?

7. Describe about Constructor with example.

8. Explain about Destructor with example.


9. Explain in about readfile () Function in PHP with example.
10. Explain in detail about fwrite() Function in PHP with example.
11. Describe about the feof()Function in PHP with example.

12. How to Copy a file in PHP

13. Explain about Read File Line by Line using fgets() method

Section- C
1. Explain basing one Class on another with inheritance.

2. Differentiate reading a file Character by character and as a whole file, with suitable
examples.

3. Explain setting access to properties and methods.

4. Explain Creating Static Methods with OOP.

5. Discuss the concept of Inheritance in PHP.

6. Illustrate the usage of constructors and destructors in PHP programming.

7. Explain the process of opening, reading and closing files in PHP.

8. Describe about access specifiers in PHP.

9. Illustrate the difference between PHP Overloading & overriding.

10. Explain Auto loading classes in PHP.

11. How to append file in PHP? Write an Example.

UNIT IV

Section-A
1. What is a Session in PHP?

2. What is a Cookie in PHP?

3. How to Creating Cookies with PHP?

4. Why use Cookies in PHP?

5. Write any one Difference between Cookies and Session.


6. Expansion of FTP.

7. What is mean by Database?

8. Write Syntax to Create Cookies with PHP.

9. Which function is used to delete a Cookie in PHP?

10. Which function is used to destroy a PHP Session?


11. How to Start a PHP Session?

12. Expansion of SQL.

13. How to Create a Table in SQL? Write Syntax.

Section- B
1. Explain in detail about Session with an Example.

2. Explain in detail about Cookies with an Example.

3. Describe about FTP.

4. Write a PHP Program to Insert Record into Database.

5. Write a PHP Program to Update Record in Database.

6. Write a PHP Program to delete a record By Using SQL Command.

7. Describe about PHP ftp_rmdir( ) function with an Example.

8. Demonstrate sorting on databases.

Section- C
1. Explain how to access the Database in PHP.

2. How to create and retrieve a cookie in PHP.

3. Explain ftp-alloc() and ftp-fget() functions.

4. Give an account on setting session in PHP.

5. How to perform various operations on databases using PHP? With example.

6. Write in brief about creating and removing directories with FTP.

7. Develop PHP Program to Create a Database and to Insert, Delete and List the records.
8. Write a PHP Program design Login form with landing page using database.

9. Write a PHP program to update and delete database records.

10. Explain how you will access databases in PHP.

11. Explain working with FTP.

UNIT V

Section-A

1. Expansion of AJAX.

2. What is AJAX function in PHP?

3. What does AJAX () do?

4. Where is AJAX used?

5. What is the use of XMLHttpRequest Object?

6. Which function is used to draw line in PHP?

7. Which function is used to create a filled rectangle?

8. Which function is used to draw a polygon in PHP?

9. How to add image tag in PHP?

10. How to set background image in PHP?

11. How to watermark an image in PHP?

12. What are all the controls of Ajax?

13. How can we cancel the XMLHttpRequest in AJAX?

14. What are the protocols used by Ajax?

Section- B
1. Give an account on PHP AJAX.

2. Write a Script to preview an image using AJAX-PHP before uploading.


3. Can you explain of utilizing AJAX to download photos? (k3)

4. Describe the process of handling AJAX requests in PHP, including the use of the
$_REQUEST super global. (CO5, K3).

5. Explain how you can use PHP`s GD library to draw basic shapes such as lines, rectangles,
and ellipses on an image.

6. How to draw a line using imageline() function in PHP?

7. How to draw a filled polygon using an imagefilledpolygon() function in PHP?

8. How to draw an ellipse using imageellipse() function in PHP?

9. How to draw an arc using imagearc() Function in PHP?

10. How to set a single pixel using imagesetpixel() function in PHP?

Section- C
1. How to handle AJAX requests? Explain with example.

2. How to draw rectangle using PHP? Explain with example.

3. Brief about downloading images using AJAX.

4. Explain how to create and display images in PHP.

5. Explain the following: (i) Draw rectangle (ii) Draw polygon.

6. Discuss in brief about working with image files in PHP.

7. Write short notes on: Tiling images & Copying images.

8. Explain the process of drawing images on server.

9. Explain how data is passed on to the server.

10. Explain the process of asynchronously loading and displaying images on a webpage using
AJAX in combination with PHP.

You might also like