Php

PHP: Basic Introduction to Namespaces

History of PHP Namespaces In PHP prior to 5.3 (2009), any class you define lived at the same global level as other classes. Class User, class Contact, class Db they're all together in the global namespace. This may seem simple, but it makes organization tough,…

Php: How to extend the highlight_string function

PHP has a cool function that automatically highlights PHP code called highlight_string(); Theoretically this could be used to roll your own code highlighting on a site, rather than rely on JavaScript or some kind of external service to do it. In this article I'll show you the basics of how…

PHP Libraries For Summer 2016

Here are our picks for the 12 most useful and interesting open-source PHP libraries that you should check out this summer!   Monolog With Monolog you can create advanced logging systems by sending your PHP logs to files, sockets, databases, inboxes or other web services. The library has over 50 handlers for various…

Php: Create your Caching System Easily and Quickly

If you need to integrate a caching system quickly, you can use this ultra simple file caching method to cache any kind of dynamic data. Usually, if you’re doing API calls or using PHP to pull data from another server it’s always good to implement some kind of caching layer.   $exists…

Easy debug of Php with ChromePhp and ChromeLogger

ChromePhp is a Module to log useful details directly in your Chrome JS console. You can inspect most as objects and see infos or values. It is a great way to debug PHP code on the fly, in Google Chrome. It's very easy to integrate to any project and log any…

PHP Filters: the best way to sanitize and validate datas

What are PHP filters? One of the most amazing strengths of PHP is its convenience. Shockingly this same profit has worked against PHP as numerous new coders have forgotten any security to establish safety or fails to offer the adroitness to make a class to validate their variables from end users. One…

10 Useful PHP Image Manipulation Libraries

In this article, we listed 10 PHP Image Manipulation Libraries which help developers making their tasks simpler.   1. Imagine   Imagine is a OOP library for image manipulation built in PHP 5.3 using the latest best practices and thoughtful design that should allow for decoupled and unit-testable code. In order to produce RGB code…

PHP: list of best awesome PHP libraries

It is an exciting time to be a PHP developer. There are lots of useful libraries released every day, and with the help of Composer and Github, they are easy to discover and use. Here is a complete list of the coolest that We’ve come across. Package Management Libraries for package and…

How to implement a PHP session timeout on your own

To Implement a session timeout on your own,  you can use a simple time stamp that denotes the time of the last activity and update it with every request. You can also use an additional time stamp to regenerate the session ID periodically to avoid attacks on sessions. Enjoy the code! if (isset($_SESSION['LAST_ACTIVITY'])…

Hash Passwords With PHP 5.5

Every PHP developer would have to build an application that relies on a user login. It means that the user of the website having a Username and Password which is stored in the database so they can login into your website. Therefore it's important that passwords stored in the database should be hashed…

We use our own cookies and third-party cookies to improve our services, show products based on your preferences, analyse the browsing habits of our users, and enable interaction with social networks. Continuing to browse our sites implies full acceptance of their use. You can change your cookie setting or get more information here: Cookies policy .