Php Intern

Php Intern Interview Questions and Answers

Updated 19 Mar 2024

Popular Companies

search-icon

Q1. Write html and CSS code to make a card

Ans.

Create a card using HTML and CSS

  • Use

    element to create the card container

  • Style the card using CSS properties like background-color, border, padding, and margin

  • Add content inside the card using

    tags for text and tag for images

Q2. Diff between require and include

Ans.

require and include are both used to include external PHP files, but require will cause a fatal error if the file is not found, while include will only produce a warning.

  • require is used when the included file is essential for the script to run

  • include is used when the included file is not essential for the script to run

  • require_once and include_once are used to prevent multiple inclusions of the same file

  • require will stop the script execution if the file is not found, while inc...read more

Php Intern Interview Questions and Answers for Freshers

illustration image

Q3. Difference between require and include

Ans.

require is a fatal error, include is a warning

  • require will produce a fatal error if the file is not found, include will only produce a warning

  • require is used when the file is essential for the script to run, include is used when the file is not essential

  • require_once and include_once are similar but ensure the file is only included once

Q4. Diff between echo and print

Ans.

Echo and print are both used to output text in PHP, but echo is faster and can output multiple values at once.

  • Echo is a language construct, while print is a function.

  • Echo can output multiple values separated by commas, while print can only output one value at a time.

  • Echo does not return a value, while print returns a value of 1.

  • Echo is faster than print because it does not need to return a value.

  • Example of echo: echo 'Hello World';

  • Example of print: print('Hello World');

Are these interview questions helpful?

Q5. SQL joining for three tables

Ans.

SQL joining for three tables involves using JOIN statements to combine data from multiple tables based on common columns.

  • Use JOIN statements to connect the tables based on common columns

  • Specify the columns to be selected from each table

  • Use aliases for table names to make the query more readable

  • Consider using different types of joins like INNER JOIN, LEFT JOIN, RIGHT JOIN, or FULL JOIN based on the requirement

Q6. Print * using loops

Ans.

Printing * using loops is a basic programming exercise.

  • Use nested loops to print * in a pattern

  • Use a for loop to print * in a straight line

  • Use a while loop to print * until a certain condition is met

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Php Intern Jobs

PHP Intern 0-3 years
CrossShore Solutions
5.0
Ahmedabad
php Internship Programme 0-3 years
Rexknar Creative Solutions
4.7
Kanyakumari
PHP intern 0-0 years
Cloud Counselage Pvt. Ltd.
4.1
Kolkata
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

4.7
 • 11 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Php Intern Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter