Skip to content
Carlo Fontanos
Carlo Fontanos

Carlo Fontanos

Software Engineer

I build web applications and share what I learn along the way.

© 2026

PHP

37 tutorials

Step-by-step programming tutorials on PHP, JavaScript, Laravel, WordPress and more.

PHP Advanced

Real-Time Updates with Plain PHP: Server-Sent Events

WebSockets need infrastructure. Polling hammers your server. SSE streams live updates over normal HTTP with a PHP file and the built-in EventSource API - reconnection included.

2 min 1,843
PHP Advanced

The Timing Attack Hiding in Your Token Comparison

Comparing secrets with === leaks how many leading characters matched, one microsecond at a time. hash_equals exists for exactly this, and knowing when to use it is the whole trick.

2 min 1,311
PHP Intermediate

Render Your Email Templates with Output Buffering

ob_start() plus include turns any PHP file into a string-returning template - the exact mechanism template engines are built on, useful raw for emails, PDFs and HTML fragments.

2 min 651
PHP Intermediate

PHP's match(true) Pattern Replaces if/elseif Chains

match() is not just a stricter switch. Feed it true as the subject and every arm becomes an arbitrary condition - an elegant, exhaustive replacement for elseif ladders.

2 min 1,952
PHP Beginner

array_column() Does Way More Than Grab a Column

The third parameter turns array_column into a re-indexing tool, it reads object properties, and combined with array_map it handles most of your collection reshaping.

2 min 1,402