|
deep inside webpages
 


Portable UTF-8 v 1.3 released

Version 1.3 of Portable UTF-8 library has been released. This version extends the functionality by adding 20 string handling and utility functions to the api. There are a few bug fixes and lots of optimizations and improvements.

You can download the the library here and the complete list and explanations of functions is available here.

All-in-One Wrapper for APC, EAccelerator, xCache and Disk Cache

This library lists apc_* family of functions for eAccelerator, xCache or Disk Cache operations when APC 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.

Checking Multidimensional Arrays in PHP

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 way, what you want to check is, is 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.

Portable UTF-8 v 1.2 released

I have just uploaded the next version of the Portable UTF-8 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 increase the functionality of the library.

You can download the new version here and the detailed explanations of all functions is available here.

Best Online Code Sharing Tools

dir_callback - Lets play with Directories (PHP)

PHP provides some handy functions for file handling, but to deal with directories, it does not provide much. It has basic directory functions and a directory iterator, but does not cover directory level operations like moving, cloning, counting files, deleting etc.

Lets try it ourself: Here we have a very simple directory function that takes a path and iterates through all its files and sub-directories (nodes) and passes on path of each node to the callback function.

License

Portable UTF-8: Demo

Portable UTF-8 - A Lightweight Library for Unicode Handling in PHP

Portable UTF-8 library is a Unicode aware alternative to PHP's native string handling API. It is written in PHP and can work without mbstring, iconv, UTF-8 support in PCRE, or any other library. The benefit of Portable UTF-8 is that it is very light-weight, fast, easy to use, easy to bundle, and it always works (no dependencies).

Interesting Use of PHP Super Globals