PHP: SPL Autoload Register

PHP allows including files in a very easy way. This is very useful when dealing with multiple classes. The spl_autoload_register(function) registers a function with the Standard PHP Library (SPL) __autoload queue. If the queue is not yet activated it will be activated. The function is a user defined function as seen in the example below.…

PHP: Variable Handling

unset() unset() destroys the specified variables. The behavior of unset() inside of a function can vary depending on what type of variable you are attempting to destroy. If a globalized variable is unset() inside of a function, only the local variable is destroyed. The variable in the calling environment will retain the same value as before unset() was called.

CSRF Protection

Cross-site request forgery (CSRF), also known as one-click attack or session riding, is a type of malicious exploit of a website where unauthorized commands are submitted from a trusted website user. Laravel makes it easy to protect your application from CSRF attacks by inspecting every incoming POST, PUT, PATCH, or DELETE for a secret session…