Skip to main content

PHP Cheatsheet

New

PHP syntax, arrays, string functions, superglobals, OOP, and modern PHP features.

phpreferencecheatsheet
Read the guide
Shortcuts:⌘ KSearch
0 entries

Frequently Asked Questions

Is this PHP cheatsheet modern enough for PHP 8 style code?

Yes. It includes match expressions, nullsafe access, union types, named arguments, readonly properties, and constructor property promotion.

Does it only show syntax, or does it include safer input/output patterns too?

It includes practical entries for filter_input, superglobals, preg_match, and htmlspecialchars, so it is not limited to bare language syntax.

Can I use it for Composer and PSR reminders?

Yes. One category covers composer init, composer require, composer install, dump-autoload, PSR-4 autoloading, and common PSR conventions like PSR-12 and PSR-3.

What is the point of the Show full syntax toggle here?

Compact mode shows a quick token like $value = $a ?? $b;. Full mode expands that into the larger snippet, and Copy syntax copies the full version.

Why did my search for autoload or htmlspecialchars still return matches outside the obvious category?

Search is not limited to titles. It also scans each entry's syntax, explanation, and example text, so related cards can appear from other tabs too.

Related Tools