MCPcopy Create free account
hub / github.com/WebReflection/JSONH / unpack

Method unpack

php5/JSONH.class.php:59–69  ·  view source on GitHub ↗
(
        /*array /*use type hint if you can removing initial comment*/
        $hlist,
        /*boolean /*use type hint if you can removing initial comment*/
        $as_array = false
    )

Source from the content-addressed store, hash-verified

57 }
58
59 public static function unpack(
60 /*array /*use type hint if you can removing initial comment*/
61 $hlist,
62 /*boolean /*use type hint if you can removing initial comment*/
63 $as_array = false
64 ) {
65 // a ternary operator for each item would have slowed down
66 // this is why there are two almost identical methods but don't worry
67 // this is not a problem, just a performances boost
68 return $as_array ? self::_unpack_array($hlist) : self::_unpack_object($hlist);
69 }
70
71 private static function _pack_array(
72 /*array /*use type hint if you can removing initial comment*/

Callers 1

parseMethod · 0.95

Calls 2

_unpack_arrayMethod · 0.95
_unpack_objectMethod · 0.95

Tested by

no test coverage detected