Author Archives: maximem

About maximem

I'm a french web developer co-managing a little web agency named Wixiweb in the north of France. I have about 6 years of working experience with PHP and I'm a Zend Framework Certified Engineer.
sessions+performance+2

Speed up your sessions, part 2 – Performance

If it's not already done, I suggest you to read the first part of this serie of two posts to learn how to use properly PHP sessions. Well, now that everyone knows what to do and not do with sessions, we ...

blackboard

Reorder numeric keys of an array from “0″ onwards

Back in the game with another PHP quick tip :) Ever faced the problem of needing to loop through an array but it has non-consecutive numeric keys ? There are some easy ways to reassign array keys from 0 onwards. Supposing that I ...

Standard PHP Library

Make objects iterable and countable using the SPL, part 1

Since its 5th version, PHP brings a full object model and offers a lot of features for OOP (Object-oriented programming). Unlike PHP 4, PHP 5 implements concepts such as visibility (public, private, protected), abstract classes and methods, interfaces... Moreover, it provides ...

calendar

Get the number of days in a month

Ever wonder how many days there are in a specific month ? Your quest is over, I have what you need : the cal_days_in_month() function from the Calendar PHP extension. This function can work with different calendars : gregorian, julian, jewish... ...

php+filter

Validate and sanitize data with PHP Filter, part 1

When coding websites or web applications, working on security is important. To prevent all kinds of injections (XSS, SQL, CSRF...), you have to check all data coming from a foreign source. The typical example is when a user send data ...