Brisk
Quiz
Practice. Learn. Score.
Home
🔍
🌙
🏆
Leaderboard
Login
IT
›
PHP
⏱
00:00
0/7 answered
Score: 0
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Question 1
What is the purpose of a "migration" file, as commonly used in a PHP framework like Laravel to manage database schema changes?
Compiles a PHP project's own source code down into an optimized, faster bytecode format
Defines a versioned, trackable change to a database's schema, such as adding a new table
Provides an object-oriented mapping between a database table and a corresponding PHP class
Manages a database session, along with its own queries and change tracking
Question 2
What is the purpose of PHP's "nullsafe operator" ("?->"), introduced in PHP 8.0, such as "$user?->getAddress()?->getCity();"?
Converts a nullable value directly into its own equivalent, explicitly non-nullable form
Forces a variable to always be treated by PHP as guaranteed to genuinely never be null
Throws a fatal error immediately if the object on the left side happens to actually be null
Safely calls a method or accesses a property, short-circuiting to null if the object is itself null
Question 3
What is the purpose of Composer's "composer.lock" file?
Declares a PHP project's own metadata and the general version ranges of its dependencies
Records the exact resolved versions of every dependency actually installed for a project
Contains the automated unit tests written specifically for that particular PHP project itself
Contains the actual, complete downloaded source code of every one of a project's dependencies
Question 4
What is the purpose of PHP's "default parameter values" in a function declaration, such as "function greet($name = 'friend')"?
Lets a caller omit that specific argument, in which case the given default value is then used
Permanently prevents that specific parameter from ever actually being explicitly supplied at all
Automatically converts that specific parameter into an equivalent, fully required parameter
Forces every single caller of that function to always explicitly supply that specific argument
Question 5
What is the purpose of PHP's "json_encode()" function?
Compresses a given PHP value to reduce its own overall stored memory footprint
Converts a PHP value into its corresponding JSON-formatted string representation
Permanently and completely encrypts a given PHP value before it is actually returned
Converts a JSON-formatted string back into its corresponding PHP value or object
Question 6
What is the purpose of PHP's "Dependency Injection" pattern, as commonly used within a framework like Laravel or Symfony?
Supplies a class's dependencies from outside, rather than the class creating them itself directly
Automatically injects a specific piece of malicious code into a currently running application
Permanently prevents any given class from ever being able to depend on any other class at all
Converts an entire application's overall architecture into a purely single-file structure
Question 7
What is the purpose of running "composer install" versus "composer update"?
composer update can only ever actually be run once, the very first time a given project is set up
update uses the exact versions locked in composer.lock; install resolves and installs newer versions
composer install and composer update behave in an entirely identical manner in every situation
install uses the exact versions locked in composer.lock; update resolves and installs newer versions
🔀 Click here to get new question set
Sign up
to save this score to the leaderboard.
Share this quiz
𝕏
💬
f
in
🔗
📚 All Quizzes
Browse every category and see the full list of quizzes on BriskQuiz
→
🏠
Home
📚
Categories
🏆
Leaderboard
👤
Profile