Probey Services PHP Fullstack Developer Interview Quiz

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

What is the correct way to center an element vertically using CSS?

  • margin: auto;
  • vertical-align: center;
  • justify-content: center;
  • align-items: center; (correct)

In PHP, what is the purpose of the var keyword for declaring variables?

  • To declare a variable with block scope
  • To declare a constant variable
  • To declare a variable with function scope
  • To declare a variable with global scope (correct)

Which of the following is NOT a valid way to add a CSS file to an HTML document?

  • (correct)

What is the difference between echo and print in PHP when outputting variables?

<p>echo automatically appends a newline character, print doesn't (B)</p> Signup and view all the answers

Which HTTP method is more suitable for passing sensitive information like passwords?

<p>POST (B)</p> Signup and view all the answers

What will be the result of the following JavaScript code snippet:

let x = null;
console.log(typeof(x));

<p>&quot;object&quot; (B)</p> Signup and view all the answers

How is the value stored at index 2 accessed in an array named 'numbers'?

<p>numbers.get(2) (B)</p> Signup and view all the answers

Which function is typically used to sort an array in ascending order?

<p>sort() (B)</p> Signup and view all the answers

What distinguishes parameters from arguments in a function definition?

<p>Parameters define the variable names used within the function, while arguments are the actual values passed when calling the function. (B)</p> Signup and view all the answers

Where does a variable declared inside a function typically have its scope?

<p>Local (C)</p> Signup and view all the answers

How can you pass an array by reference to a function in PHP?

<p>By prepending an ampersand (&amp;) before the variable name in the function call (A)</p> Signup and view all the answers

What is the primary responsibility of a back-end developer in a fullstack application?

<p>Ensuring database functionality and server-side logic (B)</p> Signup and view all the answers

Which PHP function is used to check if a character is a vowel?

<p>isVowel($char) (D)</p> Signup and view all the answers

What does the given PHP function 'reverseString' do?

<p>Reverses a string (B)</p> Signup and view all the answers

In the Fibonacci Sequence PHP function provided, what is the purpose of the '$largest' variable?

<p>To store the largest Fibonacci number (A)</p> Signup and view all the answers

What is the main functionality of the PHP function 'isPalindrome'?

<p>Checks if a string is a palindrome (B)</p> Signup and view all the answers

What will be the output of the 'isPalindrome' function for the input 'Race Car'?

<p>'Race Car' is a palindrome (D)</p> Signup and view all the answers

In the 'findLargest' PHP function, what does the line 'if ($num > $largest) { $largest = $num; }' do?

<p>Updates the largest number found if a new larger number is encountered (D)</p> Signup and view all the answers

Which statement about Git and SVN is correct?

<p>Git is for code management, while SVN is for document management. (B)</p> Signup and view all the answers

What is the primary purpose of using a Content Delivery Network (CDN) in a web application?

<p>To improve website performance by delivering static content from geographically distributed servers (A)</p> Signup and view all the answers

What is the main difference between a session and a cookie in a web application?

<p>Sessions are stored on the server-side, while cookies are stored on the client-side (user's browser). (D)</p> Signup and view all the answers

Which approach is considered a secure method for storing user passwords in a PHP application?

<p>Hashing passwords with a one-way hashing algorithm before storing them in the database (B)</p> Signup and view all the answers

What is the primary benefit of using RESTful APIs in a web application?

<p>To provide a standardized and predictable way to exchange data between different applications (D)</p> Signup and view all the answers

Which statement best describes the relationship between sessions and cookies in web applications?

<p>Sessions often rely on cookies to store session identifiers, allowing for stateful communication. (B)</p> Signup and view all the answers

Which of the following is NOT a common task for a PHP web application?

<p>Compiling source code (D)</p> Signup and view all the answers

What is the most common way to connect a PHP application to a MySQL database?

<p>Using PDO (PHP Data Objects) (C)</p> Signup and view all the answers

What is the primary purpose of web development frameworks like Laravel or Symfony?

<p>To provide a pre-built structure and functionalities for web development (B)</p> Signup and view all the answers

How does a web server differentiate between a GET and POST request?

<p>By the HTTP method specified in the request header (A)</p> Signup and view all the answers

What is a common security measure to prevent SQL injection attacks?

<p>Using prepared statements with parameter binding (A)</p> Signup and view all the answers

What is the difference between version control systems like Git and SVN?

<p>Git is a distributed version control system, while SVN is centralized (C)</p> Signup and view all the answers

Flashcards are hidden until you start studying

More Like This

PHP Basics: Introduction and Syntax
12 questions
PHP Welling Chapter 6-11 Flashcards
37 questions
PHP Basics Quiz
20 questions

PHP Basics Quiz

StunningElegy4323 avatar
StunningElegy4323
Use Quizgecko on...
Browser
Browser