This library lists apc_* family of functions for eAccelerator, xCache or Disk Cache operations if APC or APCu is not available on server. When APC is installed and enabled, this library does nothing (because the desired functions are already available) – resulting in zero wrapper call overhead since all calls go directly to internal APC api.

Continue reading

When working with arrays in PHP, you may often need to check whether each of an array’s element contains scalar data or is there an element that contains another array (a sub-array). In other words, what you want is to check if the array multidimensional? To solve the mystery, many people quote a buggy snippet on stackoverflow and other programming websites. Reading through such pages, I decided to explain a bug in the most commonly used method of checking multidimensional arrays, and also to provide the right solution.

Continue reading

I have just uploaded the next version of the Portable UTF-8, PHP unicode library. This version adds 9 UTF-8 string functions to the library. There are a few bug fixes, and also some performance optimizations, but the release was mainly to extend the functionality of the library.

Continue reading

Here is the list of many popular code sharing tools. Many of these have pretty code highlighting facility for popular programming languages. Few even allow embedding code into websites.

Continue reading

When the php.ini directive auto_globals_jit is enabled, $_SERVER and $_ENV super global arrays are created at the time they are first used in the script, rather than being initialized at the start of script. The benefit of this directive is that these super global arrays are not created at all if not used within a script, resulting in a little performance gain.

Continue reading