Skip to content

Instantly share code, notes, and snippets.

View dazz's full-sized avatar

Anne-Julia Seitz dazz

View GitHub Profile
<?php
$tests = array(
array('{"test":""}', 2),
array('{"test": {}}', 3),
array('{"test": {}, "test2": ""}', 3),
array('{"test": {}, "test2": {}}', 3),
array('{"test": {}, "test2": {"test3": ""}}', 3),
array('{"test": {}, "test2": {"test3": {}}}', 4),

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer

<?php
/**
* Class casting
*
* @param string|object $destination
* @param object $sourceObject
* @return object
*/
function cast_long($destination, $sourceObject)