Articles

How to emulate register_globals directive and session_register()/session_unregister() functions

I am working on migrating legacy PHP application from PHP 5.2 to at least PHP 5.6. It is 50K+ lines application that heavily relies on enabled register_globals directive and session_register()/session_unregister() functions. This functionality has been deprecated as of PHP 5.3.0 and removed as of PHP 5.4.0. I will demonstrate how to emulate register_globals directive and session_register()/session_unregister() functions in PHP 5.6 or later.

Read More

How to format Laravel Blade templates in Visual Studio Code

Visual Studio Code is a wonderful editor and recently became my primary web development tool. I am developing using Laravel framework and there are many good extensions for Laravel and PHP in general. I configured PHP CS Fixer as my PHP formatter and Beautify as SASS/CSS, JavaScript and HTML formatter.

The only missing part was formatting Blade templates.

Read More