PHPackages                             hejunjie/fortune-analyzer - 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. hejunjie/fortune-analyzer

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

hejunjie/fortune-analyzer
=========================

一款简洁易用的 PHP 八字排盘工具库，提供阳历与农历的相互转换、精准的节气时间计算、四柱排盘（八字）分析及五行推演等功能。代码注释清晰，结构简洁，适合开发者快速上手并理解命理计算原理。无论是个人使用，还是作为命理学工具的开发基础，都能为您的项目提供稳定可靠的支持。

v1.5.4(1mo ago)25779[1 issues](https://github.com/zxc7563598/php-fortune-analyzer/issues)MITPHPPHP &gt;=8.1

Since Jun 7Pushed 1mo agoCompare

[ Source](https://github.com/zxc7563598/php-fortune-analyzer)[ Packagist](https://packagist.org/packages/hejunjie/fortune-analyzer)[ RSS](/packages/hejunjie-fortune-analyzer/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)DependenciesVersions (11)Used By (0)

hejunjie/fortune-analyzer
=========================

[](#hejunjiefortune-analyzer)

English ｜ [简体中文](./README.zh-CN.md)

A BaZi (Four Pillars of Destiny) charting library for PHP, supporting solar-lunar calendar conversion between 1900-2100, precise 24 solar terms calculation, Four Pillars charting, Five Elements analysis, Ten Gods interpretation, and Luck Cycles calculation.

Live Demo: [hejunjie.life/composer/fortune-analyzer](https://hejunjie.life/composer/fortune-analyzer)

**This project has been parsed by Zread. Click to learn more: [Learn More](https://zread.ai/zxc7563598/php-fortune-analyzer)**

Features
--------

[](#features)

- Solar-lunar calendar conversion, covering 1900-2100
- 24 solar terms accurate to the second, powered by [Jet Propulsion Laboratory](https://www.jpl.nasa.gov) data
- Four Pillars charting (year, month, day, hour pillars) with Wu Hu Dun and Wu Shu Dun calculations
- Five Elements statistics (with/without hidden stems) and element configuration detection, covering San Hui, San He, Liu He, and Wu Ju
- Ten Gods distribution and interpretation, categorized by Yin Star, Bi Jie, Shi Shang, Guan Sha, and Cai Star
- Luck Cycles calculation, supporting start age computation and multi-step cycle projection, with Five Elements and Ten Gods annotations per step
- Well-commented code with Chinese annotations for every calculation step, suitable for learning and customization

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1

Installation
------------

[](#installation)

```
composer require hejunjie/fortune-analyzer
```

Quick Start
-----------

[](#quick-start)

```
