Probey Services PHP Fullstack Developer Interview Quiz
30 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

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</p> Signup and view all the answers

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

    <p>POST</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;</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)</p> Signup and view all the answers

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

    <p>sort()</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.</p> Signup and view all the answers

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

    <p>Local</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</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</p> Signup and view all the answers

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

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

    What does the given PHP function 'reverseString' do?

    <p>Reverses a string</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</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</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</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</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.</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</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).</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</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</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.</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</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)</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</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</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</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</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser