Questions

PHP questions

Choose a question page, learn the concept, then test your understanding with a quiz.

How to Sort a 2D Array by a Column Value in PHP

Learn how to sort a 2D array by a column value in PHP using usort, spaceship operator, and practical examples for associative arrays.

phparrayssortingmultidimensional-array

Long Polling vs SSE vs WebSockets vs Comet in JavaScript

Learn Long Polling, SSE, WebSockets, and Comet in JavaScript, how they keep connections open, and when to use each for real-time apps.

phpwebsocketcometlong-polling

PHP Enumerations: How to Model Enums Before and With Native Enums

Learn how to represent enumerations in PHP, common workarounds, native enum syntax, and when to use constants or enum classes.

phpenumeration

PHP Syntax Symbols Explained: Operators, Tokens, and What They Mean

Learn what common PHP syntax symbols mean, including operators like ==, ===, ->, =>, ??, ?:, and more with clear examples.

phpargumentsoperatorssymbols

PHP require vs include vs require_once vs include_once Explained

Learn the difference between require, include, require_once, and include_once in PHP, with examples, errors, and when to use each one.

phpincluderequirerequire-once

PHP self vs $this: Difference, Usage, and When to Use Each

Learn the difference between self and $this in PHP, when to use each, and how static vs instance context works with clear examples.

phpclassoopscope

Public vs Private vs Protected in PHP Classes

Learn the difference between public, private, and protected in PHP classes, when to use each, and how visibility affects methods and properties.

phpoopprivatepublic

Secure Password Hashing in PHP: Salts, password_hash(), and Best Practices

Learn secure password hashing in PHP using salts, password_hash(), and password_verify() instead of MD5 or SHA for safe storage.

phpsecurityhashpasswords

Understanding Common PHP Errors, Warnings, and Notices

Learn what common PHP errors, warnings, and notices mean, why they happen, and how to debug and fix them effectively.

phparraysdebuggingerror-handling

Understanding Undefined Variable, Undefined Index, Array Key, and Offset Notices in PHP

Learn what PHP undefined variable, index, array key, and offset messages mean, why they appear, and how to fix them safely.

phparraysvariableswarnings

What Is stdClass in PHP? A Beginner-Friendly Guide

Learn what stdClass is in PHP, how it works, when PHP creates it automatically, and how to use it with practical examples.

phpstdclass

Why You Should Not Use mysql_* Functions in PHP

Learn why mysql_* functions are obsolete in PHP, what risks they cause, and which modern alternatives to use instead.

phpmysql

Page 2 of 2 - 32 questions