about lambda expressions and lambda PHP functions, then step through different example–from basic lambda functions, recursive lambda functions, lambda functions in PHP arrays and in PHP classes.
Application Architecture
In this section, you will find articles, tutorials, and snippets covering all areas of Application Architecture in PHP.
Other Categories: Databases, News, Pear, PHP Functions, Setup & Installation, Site Operation, Tools, Tricks & Hacks.
PHP has always had a few simple ways to implement password hashing to an extent. MD5 and SHA1 are examples of this, but the security of these methods is not what it should be. Many developers use MD5 and SHA1 without even adding a SALT, which is a string that helps to add complexity to the application. Some developers use something as awful as base 64 encoding and decoding simply because they can be easily manipulated. But these things are not secure folks, and the clever people who want to hack your site or steal your money can see right through them. Yes, they can.
Debugging is one of the most important and significant part of software development. Finding bugs and errors in any application is a tedious task for the developers. So, proper debugging mechanism should be adopted to make the process easier. Without following proper debugging process, software bugs and errors can not be detected easily and efficiently. As per PHP programming model, we should be aware of all the tools available for debugging and eliminating malfunctioning components from our software system. In this article we will concentrate on the core PHP debugging process. The core mechanism consists of the process of using the program to trace errors and discrepancies. The out-put is gathered through the script execution and displayed at the end of the script.
One way of constructing the mock object is to replace functions with stubs that just return NULL. This is useful for utility functions that call an external resource such as an API or database. This is useful for when you don’t care what comes back, but the code you are testing calls a function that needs to be accounted for.
A developer may consider his code as perfect if it runs successfully without any compile-time or run-time error. But there is always a scope of improvement in working code and refactoring improves the structure of existing code. The code, if not improved, may hamper the performance of an application considering factors such as memory, speed, reusability, etc.
Closures (also known as anonymous functions or lambda functions) are just that – Anonymous or closed. They don’t follow the standard function declaration, and can be created inline. If you’ve used any modern JavaScript library, you’ve already done this.
clustering in PHP with this latest installment. Learn how to use GlusterFS to add an additional load balancer as a hot spare
PrimeElements can drastically reduce the amount of work required to create nice looking and functional UIs by providing a rapid application development kit based on standard Web Components technologies. Learn more about some of the most practical PrimeElements in PHP.
One of the common problems with PHP used to be that if you chose to use a particular framework, you were only able to use the libraries and plugins that are made specifically for that PHP framework. It was difficult to switch the frameworks or to re-use the code between frameworks. However, PHP has experienced major changes recently. Composer, a package manager widely used by PHP developers, and latest generation frameworks, such as Laravel and Symfony, have enabled PHP developers to create framework-agnostic packages.
Explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets.