| 1 | What is variable scope in PHP, and why can't a function normally access a variable defined outside of it? PHP › Functions & Scope | PHP | Functions & Scope | Beginner |
| 2 | How does recursion work in PHP functions, and what are the practical considerations, such as stack depth limits, when writing a recursive function? PHP › Functions & Scope | PHP | Functions & Scope | Advanced |
| 3 | What does it mean that functions are 'first-class objects' in Python? Python › Functions & Scope | Python | Functions & Scope | Beginner |
| 4 | What is Python's LEGB rule for variable scope resolution, and what does each letter stand for? Python › Functions & Scope | Python | Functions & Scope | Intermediate |
| 5 | How does the 'nonlocal' keyword let a nested function modify a variable in its ENCLOSING (not global) scope? Python › Functions & Scope | Python | Functions & Scope | Intermediate |
| 6 | What are default parameter values and variadic functions in PHP, and how do they add flexibility to how a function can be called? PHP › Functions & Scope | PHP | Functions & Scope | Intermediate |
| 7 | How does a closure capture variables from its enclosing scope, and what pitfall occurs when creating multiple closures inside a loop? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 8 | How do you define and call a basic function in PHP, and what are function parameters and return values? PHP › Functions & Scope | PHP | Functions & Scope | Beginner |
| 9 | What is the difference between positional arguments and keyword arguments when calling a function? Python › Functions & Scope | Python | Functions & Scope | Beginner |
| 10 | How do default parameter values work, and when are they evaluated? Python › Functions & Scope | Python | Functions & Scope | Beginner |
| 11 | Why do you need the 'global' keyword to MODIFY a global variable from inside a function, but not to simply READ it? Python › Functions & Scope | Python | Functions & Scope | Intermediate |
| 12 | How do *args and **kwargs let a function accept an arbitrary number of positional and keyword arguments? Python › Functions & Scope | Python | Functions & Scope | Intermediate |
| 13 | What are named arguments introduced in PHP 8, and how do they improve the readability of function calls with many parameters? PHP › Functions & Scope | PHP | Functions & Scope | Intermediate |
| 14 | How does the static keyword affect a variable declared inside a function, and how does this differ from a regular local variable? PHP › Functions & Scope | PHP | Functions & Scope | Intermediate |
| 15 | Why is using a mutable default argument (like an empty list) a classic Python bug, and how do you avoid it? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 16 | How do keyword-only arguments (using a bare '*' in the parameter list) force certain parameters to be passed by name only? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 17 | How do positional-only parameters (using a bare '/' in the parameter list, Python 3.8+) restrict how certain parameters can be passed? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 18 | How do you use functools.partial to create a new function with some arguments pre-filled? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 19 | How does Python evaluate default argument expressions ONLY ONCE at definition time, and what SAFE pattern exploits this for genuinely useful caching? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 20 | How do you correctly type-hint a function using *args and **kwargs with modern typing, like ParamSpec for preserving a wrapped function's exact signature? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 21 | How would you implement a function that dynamically inspects its own call arguments at runtime using the 'inspect' module, useful for building generic validation or logging decorators? Python › Functions & Scope | Python | Functions & Scope | Advanced |
| 22 | How do function type declarations and return type declarations improve code reliability, and how does PHP handle nullable and union types in function signatures? PHP › Functions & Scope | PHP | Functions & Scope | Advanced |
| 23 | What is an anonymous function in PHP, and how does it differ from a regular named function? PHP › Closures & Anonymous Functions | PHP | Closures & Anonymous Functions | Beginner |
| 24 | What is the use keyword in a PHP closure, and why is it needed to access outside variables from within an anonymous function? PHP › Closures & Anonymous Functions | PHP | Closures & Anonymous Functions | Beginner |
| 25 | What is the difference between single quoted and double quoted strings in PHP, particularly regarding variable interpolation and escape sequences? PHP › Strings & String Functions | PHP | Strings & String Functions | Beginner |
| 26 | How does passing a variable by reference into a closure's use clause differ from the default pass by value behavior? PHP › Closures & Anonymous Functions | PHP | Closures & Anonymous Functions | Intermediate |
| 27 | How do you sort arrays in PHP, and what is the difference between functions like sort, asort, and usort? PHP › Arrays in PHP | PHP | Arrays in PHP | Intermediate |
| 28 | How do variable variables and variable scope work in PHP, and what are common pitfalls to avoid? PHP › Basics & Types | PHP | Basics & Types | Intermediate |
| 29 | How do you create a basic command-line argument parser using argparse? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Beginner |
| 30 | How do you create and run a basic thread using the threading module? Python › Concurrency (asyncio/threading/multiprocessing) | Python | Concurrency (asyncio/threading/multiprocessing) | Beginner |
| 31 | What is the difference between a Python list and a tuple? Python › Data Types & Structures | Python | Data Types & Structures | Beginner |
| 32 | How do you use print statements effectively for debugging, including showing variable names alongside values? Python › Debugging & Profiling | Python | Debugging & Profiling | Beginner |
| 33 | What is a decorator, and how does the @decorator_name syntax relate to a plain function call? Python › Decorators | Python | Decorators | Beginner |
| 34 | How do you write a basic decorator that adds a print statement before and after calling the decorated function? Python › Decorators | Python | Decorators | Beginner |
| 35 | What is an array in PHP and what types of arrays does PHP support? PHP › Arrays in PHP | PHP | Arrays in PHP | Beginner |
| 36 | How do you add, remove, and access elements within a PHP array? PHP › Arrays in PHP | PHP | Arrays in PHP | Beginner |
| 37 | What is the nullsafe operator introduced in PHP 8, and how does it simplify safely accessing a chain of potentially null properties or methods? PHP › PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | PHP | PHP 8 Features (Attributes, Enums, Match, Nullsafe Operator) | Beginner |
| 38 | How do you run a PHP script from the command line, and how does this differ from running PHP through a web server? PHP › PHP CLI Scripting | PHP | PHP CLI Scripting | Beginner |
| 39 | How do you access command line arguments passed to a PHP script using the $argv and $argc superglobals? PHP › PHP CLI Scripting | PHP | PHP CLI Scripting | Beginner |
| 40 | What are type declarations in PHP, and how do they let you specify what kind of value a function parameter or return value should be? PHP › Type Declarations & Strict Types | PHP | Type Declarations & Strict Types | Beginner |
| 41 | What is PHPUnit, and what is a unit test meant to actually verify about a piece of code? PHP › Unit Testing with PHPUnit | PHP | Unit Testing with PHPUnit | Beginner |
| 42 | How do you implement boolean flags using action='store_true' and action='store_false'? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Intermediate |
| 43 | How do you send a value INTO a generator using the .send() method, and how does this differ from just calling next()? Python › Comprehensions & Generators | Python | Comprehensions & Generators | Intermediate |
| 44 | Why can't you use a mutable default value (like an empty list) directly as a dataclass field default, and how do you use field(default_factory=...) to fix it? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Intermediate |
| 45 | How does functools.partial work and when is it useful? Python › functools & Functional Programming Tools | Python | functools & Functional Programming Tools | Intermediate |
| 46 | How do mutable default arguments create a subtle memory and correctness pitfall related to object lifetime? Python › Memory Management & Garbage Collection | Python | Memory Management & Garbage Collection | Intermediate |
| 47 | What is the difference between an absolute import and a relative import within a package? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 48 | What is __all__ and how does it control `from module import *` behavior? Python › Modules & Packaging | Python | Modules & Packaging | Intermediate |
| 49 | How does super() work in the context of multiple inheritance, and why is it more than just 'call the parent class'? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Intermediate |
| 50 | How do array_map, array_filter, and array_reduce help you transform and process array data without writing manual loops? PHP › Arrays in PHP | PHP | Arrays in PHP | Intermediate |
| 51 | What is array destructuring in PHP, and how does the list function or short array syntax simplify extracting values from an array? PHP › Arrays in PHP | PHP | Arrays in PHP | Intermediate |
| 52 | What are PHP's comparison operators, and how does the spaceship operator introduced in PHP 7 simplify writing custom comparison logic? PHP › Basics & Types | PHP | Basics & Types | Intermediate |
| 53 | What is the difference between a static property or method and an instance property or method in PHP? PHP › OOP | PHP | OOP | Intermediate |
| 54 | How do trait properties and static properties behave when a trait is used by multiple different classes, and is that state actually shared between them? PHP › Traits | PHP | Traits | Intermediate |
| 55 | What is the arrange act assert pattern, and how does structuring a test around these three distinct steps make tests clearer and easier to understand? PHP › Unit Testing with PHPUnit | PHP | Unit Testing with PHPUnit | Intermediate |
| 56 | How do you implement subcommands (like 'git commit' or 'git push') using argparse's add_subparsers()? Python › Command-Line Interfaces (argparse) | Python | Command-Line Interfaces (argparse) | Advanced |
| 57 | How would you use Python 3.10+'s kw_only=True (or per-field kw_only) to require dataclass fields be passed as keyword arguments only? Python › Dataclasses & NamedTuples | Python | Dataclasses & NamedTuples | Advanced |
| 58 | How do you stack MULTIPLE decorators on the same function, and in what order do they actually execute? Python › Decorators | Python | Decorators | Advanced |
| 59 | How does Python resolve circular imports, and what strategies avoid the resulting ImportError? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 60 | How does the module search and caching system handle submodule imports like `import package.subpackage.module`? Python › Modules & Packaging | Python | Modules & Packaging | Advanced |
| 61 | How does cooperative multiple inheritance require every class in the hierarchy to call super() consistently, even in __init__? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Advanced |
| 62 | How would you design a mixin to be safely combinable with any base class's __init__ signature using **kwargs? Python › Multiple Inheritance & MRO | Python | Multiple Inheritance & MRO | Advanced |
| 63 | How does PHP handle array copying behavior, and when do arrays actually get passed by reference instead of by value? PHP › Arrays in PHP | PHP | Arrays in PHP | Advanced |
| 64 | How do data providers in PHPUnit let you run the exact same test logic repeatedly against many different sets of input data, without duplicating the test method itself? PHP › Unit Testing with PHPUnit | PHP | Unit Testing with PHPUnit | Advanced |
| 65 | How does test driven development, commonly abbreviated as TDD, change the typical order in which tests and actual implementation code are written, and what benefits does this workflow claim to offer? PHP › Unit Testing with PHPUnit | PHP | Unit Testing with PHPUnit | Advanced |