PHPackages                             putyy/php-constants - 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. putyy/php-constants

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

putyy/php-constants
===================

The php-constants Packages

1.0.3(2y ago)51431MITPHPPHP &gt;=7.2

Since Nov 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/putyy/php-constants)[ Packagist](https://packagist.org/packages/putyy/php-constants)[ Docs](https://github.com/putyy/php-constants.git)[ RSS](/packages/putyy-php-constants/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

自用常量基础类库
--------

[](#自用常量基础类库)

```
composer require putyy/php-constants

```

### 示例1

[](#示例1)

```
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/test.php';
require_once __DIR__ . '/we-chat.php';

# todo 发送微信消息
$msgData= WeChatMsgConst::buildMessage([
"openid"=>"asdsadqwewqe",
"content"=>"hello PHP~",
]);

var_dump($msgData);
```

```
string(114) "
    {
    "touser":"asdsadqwewqe",
    "msgtype":"text",
    "text":
    {
    "content":"hello PHP~"
    }
    }"

```

### 示例1

[](#示例1-1)

```
