Array – Dot Notation

Chris Pitt shows you how to setup your own dot notation for arrays by using Laravel as an example.

I like these and his example is a good one:

$config["app"]["cache"]["provider"] = "redis";

// Typical way:
if (!empty($config["app"]["cache"]["provider"])) {}

// compared to: 
$config->get("app.cache.provider", $default);