Senior PHP Web Developer

Senior PHP Web Developer Interview Questions and Answers

Updated 12 Jun 2024

Q1. Table A has columns A-name, A-desc, A-BID, Table B has B-ID, B-name, A-BID is FK from B table, which JOIN to apply if want to get records which are A and B too.

Ans.

Use INNER JOIN to get records from both Table A and Table B based on the foreign key A-BID.

  • Use INNER JOIN to combine records from Table A and Table B based on the common column A-BID.

  • Specify the join condition using ON clause.

  • Select the columns you want to retrieve from both tables.

Q2. Write PHP script to sort an array without PHP default functions

Ans.

PHP script to sort an array without default functions

  • Create a function to implement a sorting algorithm like bubble sort, selection sort, or insertion sort

  • Loop through the array and compare each element with the next one to determine the order

  • Swap elements if they are in the wrong order until the array is sorted

Q3. Explain how login works in CodeIgniter/Laravel

Ans.

Login in CodeIgniter/Laravel involves creating a form for users to input their credentials, validating the input, checking against database records, and setting a session for authenticated users.

  • Create a login form with fields for username and password

  • Validate user input to ensure it meets required criteria

  • Check the entered credentials against records in the database

  • Set a session for authenticated users to maintain their login status

Q4. How to set session for 5 mins

Ans.

Use the session_set_cookie_params function to set session for 5 mins

  • Use session_set_cookie_params function to set the session cookie lifetime to 5 minutes

  • Example: session_set_cookie_params(300); // 300 seconds = 5 minutes

Are these interview questions helpful?

Q5. Difference between session & cookie

Ans.

Session stores data on server side while cookie stores data on client side.

  • Session data is stored on the server, while cookie data is stored on the client's browser.

  • Sessions are more secure as the data is not exposed to the client, while cookies can be easily manipulated by the client.

  • Sessions are typically used for storing sensitive information like user credentials, while cookies are used for tracking user behavior or preferences.

  • Sessions expire when the user closes the bro...read more

Q6. Minimum people strength?

Ans.

The minimum people strength depends on the project requirements and scope.

  • The minimum people strength can vary depending on the project size and complexity.

  • It is important to have a balanced team with the right mix of skills and experience.

  • The team should be able to work collaboratively and communicate effectively.

  • For a small project, a team of 2-3 developers may be sufficient, while a larger project may require a team of 5-10 developers.

  • The minimum people strength should be ...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. Explain PDO in PHP

Ans.

PDO in PHP is a PHP Data Objects extension that provides a consistent interface for accessing databases.

  • PDO stands for PHP Data Objects

  • It is a database access layer providing a uniform method of access to multiple databases

  • It is more secure than the traditional MySQL extension

  • PDO supports prepared statements to prevent SQL injection attacks

Senior PHP Web Developer Jobs

Senior Php Web Developer 3-5 years
Jobmygoal Technology
0.0
₹ 4 L/yr - ₹ 7 L/yr
Navi Mumbai
Senior PHP Web Developer 3-8 years
Regur Technology Solutions
5.0
Ahmedabad
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

4.5
 • 4 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

Senior PHP Web Developer 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

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