All posts tagged with "PHP"

View all tags

Flattening arrays in PHP

A short & easy way to flatten two-dimensional arrays, and a slightly more verbose one to handle arbitrarily nested arrays.

Accessing private properties in PHP

Private properties can only be accessed by the class that defines the property… right? Actually, PHP has a few ways to circumvent this: reflection, closures and array casting.