PHPackages                             aklump/default-value - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aklump/default-value

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aklump/default-value
====================

Calculates the default value based on variable type, including fully-qualified classnames.

0.0.6(2y ago)0269↓50%1GPL-2.0-or-laterPHPPHP &gt;=7.0

Since Mar 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aklump/default-value)[ Packagist](https://packagist.org/packages/aklump/default-value)[ RSS](/packages/aklump-default-value/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (1)

Default Value
=============

[](#default-value)

A small utility to return a default value or instance based on a variable type or classname.

Vanilla PHP
-----------

[](#vanilla-php)

```
