You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-9Lines changed: 54 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,37 @@
5
5
[](https://packagist.org/packages/jayeshmepani/swiss-ephemeris-ffi)
PHP 8.3+ FFI wrapper for the Swiss Ephemeris C library.
8
9
9
-
100% precise 1:1 FFI mapping of the Swiss Ephemeris C library for PHP 8.3+. Complete wrapper for all 106 functions.
10
+
This package is designed to expose the Swiss Ephemeris C API to PHP through FFI, without shelling out to the `swetest` command-line tool.
11
+
12
+
**Zero abstraction. Native-level FFI. Verified output parity with Swiss Ephemeris C engine.**
13
+
14
+
> Swiss Ephemeris PHP FFI provides a zero-abstraction, 1:1 mapping of the native Swiss Ephemeris C library. All 106 public API functions are exposed with complete constant and signature parity.
15
+
>
16
+
> The wrapper performs no additional calculations, transformations, or rounding, ensuring direct memory-level interaction with the C engine.
17
+
>
18
+
> Outputs are verified against the official `swetest` CLI using automated PHPUnit tests, demonstrating bit-level parity in verified test scenarios for planetary positions, house systems, eclipses, and edge-date calculations.
19
+
20
+
## Latest Upstream Status
21
+
22
+
Checked against upstream on **April 25, 2026**.
23
+
24
+
-**Latest upstream release tag**: `v2.10.3final` released on **April 14, 2026**.
25
+
-**Current upstream `master` checked**: commit `2f18c14` from **April 18, 2026** (`fixed bug in semo4200.se1`).
26
+
-**Swiss Ephemeris 3.0**: announced by upstream as the next major source-code release, but no public `v3.0` tag was available at the time of this check.
27
+
-**DE441 data update**: upstream states that, as of **April 14, 2026**, all `.se1` data files for planets and asteroids were rebuilt with JPL Ephemeris DE441.
28
+
-**Compatibility note**: upstream states that the rebuilt `.se1` files remain compatible with older Swiss Ephemeris versions at least back to release 1.67.
29
+
-**Asteroid data**: upstream documents more than **760,000 numbered asteroids** and more than **25,000 named asteroids**. Commit history also records asteroid list updates through numbered asteroid `793066`.
30
+
-**Internal Swiss Ephemeris version string**: the upstream C header still defines `SE_VERSION` as `2.10.03`.
31
+
32
+
See [`VERSION.md`](VERSION.md) and [`UPSTREAM_SYNC.md`](UPSTREAM_SYNC.md) for detailed version tracking.
10
33
11
34
## Requirements
12
35
13
-
- PHP 8.3+ with FFI extension
14
-
-`ffi.enable=1` in php.ini
36
+
- PHP `^8.3`
37
+
- PHP FFI extension (`ext-ffi`)
38
+
- FFI enabled in PHP configuration. Depending on your environment, this usually means setting `ffi.enable=true`, or configuring FFI preload mode correctly.
- Swiss Ephemeris official information: <https://www.astro.com/swisseph/swephinfo_e.htm>
95
+
53
96
## License
54
97
55
-
AGPL-3.0. See [LICENSE](LICENSE) for details.
98
+
This package metadata declares **AGPL-3.0-or-later**.
99
+
100
+
The upstream Swiss Ephemeris C library and ephemeris data are distributed under Astrodienst's dual licensing model: **AGPL** or **Swiss Ephemeris Professional License**. If you use Swiss Ephemeris in commercial or closed-source software, or in a public SaaS/web service, review Astrodienst's license terms before use.
0 commit comments