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…

PHP7: Guide and References to all the changes between version 5.x and 7 of PHP

PHP 7 was released on December 3rd, 2015. It comes with a number of new features, changes, and backwards compatibility breakages that are outlined below. Performance Features Combined Comparison Operator Null Coalesce Operator Scalar Type Declarations Return Type Declarations Anonymous Classes Unicode Codepoint Escape Syntax Closure call() Method Filtered unserialize() IntlChar Class Expectations Group use Declarations Generator Return Expressions Generator Delegation Integer Division with intdiv() session_start() Options preg_replace_callback_array() Function CSPRNG Functions Support…

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'])…

Newsletter

Latest news from Hi-Tech world