PHPackages                             opensourcewebsite-org/php-stellar-sdk - 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. [API Development](/categories/api)
4. /
5. opensourcewebsite-org/php-stellar-sdk

ActiveLibrary[API Development](/categories/api)

opensourcewebsite-org/php-stellar-sdk
=====================================

Stellar Horizon client library for the PHP language

v0.7.0(7y ago)69704MITPHP

Since Oct 9Pushed 3y ago2 watchersCompare

[ Source](https://github.com/opensourcewebsite-org/php-stellar-sdk)[ Packagist](https://packagist.org/packages/opensourcewebsite-org/php-stellar-sdk)[ RSS](/packages/opensourcewebsite-org-php-stellar-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (14)Used By (0)

PHP Stellar SDK
===============

[](#php-stellar-sdk)

[![License](https://camo.githubusercontent.com/c2bffd81d308ced1cc3b0d66fb0ed453ab478a5e17c988b780f9de986a390ee2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/7d542d7725082b04fea064962e5c2915bf2631e102b531aee9650e1a536184d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342d626c75652e7376673f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://www.php.net)

PHP Stellar SDK provides APIs to build and sign transactions, connect and query [Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon).

This library is under active development and should be considered beta quality. Please ensure that you've tested extensively on a test network and have added sanity checks in other places in your code.

The repository is a part of the [OpenSourceWebsite Organization](https://github.com/opensourcewebsite-org). This project and everyone participating in it is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).

Getting Started
---------------

[](#getting-started)

[See the release notes for breaking changes](CHANGELOG.md).

See the [getting-started](getting-started/) directory for examples of how to use this library. Additional examples are available in the [examples](examples/) directory.

Please read through [Stellar API Documentation](https://developers.stellar.org/api) and [Stellar Testnet Documentation](https://developers.stellar.org/docs/glossary/testnet/).

Contributing
------------

[](#contributing)

Please read through our [Contribution Guidelines](CONTRIBUTING.md).

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
composer require opensourcewebsite-org/php-stellar-sdk

```

or add

```
"opensourcewebsite-org/php-stellar-sdk": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

### Large Integer Support

[](#large-integer-support)

The largest PHP integer is 64-bits when on a 64-bit platform. This is especially important to pay attention to when working with large balance transfers. The native representation of a single XLM (1 XLM) is 10000000 stroops.

Therefore, if you try to use a `MAX_INT` number of XLM (or a custom asset) it is possible to overflow PHP's integer type when the value is converted to stroops and sent to the network.

This library attempts to add checks for this scenario and also uses a `BigInteger`class to work around this problem.

If your application uses large amounts of XLM or a custom asset please do extensive testing with large values and use the `StellarAmount` helper class or the `BigInteger`class if possible.

### Floating point issues

[](#floating-point-issues)

Although not specific to Stellar or PHP, it's important to be aware of problems when doing comparisons between floating point numbers.

For example:

```
$oldBalance = 1.605;
$newBalance = 1.61;

var_dump($oldBalance + 0.005);
var_dump($newBalance);
if ($oldBalance + 0.005 === $newBalance) {
    print "Equal\n";
}
else {
    print "Not Equal\n";
}
```

The above code considers the two values not to be equal even though the same value is printed out:

Output:

```
float(1.61)
float(1.61)
Not Equal

```

To work around this issue, always work with and store amounts as an integer representing stroops. Only convert back to a decimal number when you need to display a balance to the user.

The static `StellarAmount::STROOP_SCALE` property can be used to help with this conversion.

Tests
-----

[](#tests)

```
$ composer test
```

Feedback
--------

[](#feedback)

To request a new feature, submit a bug report, give us feedback, start a design discussion or have an idea to make this code better feel free to [open an issue](https://github.com/opensourcewebsite-org/php-stellar-sdk/issues), or [create a pull request](https://github.com/opensourcewebsite-org/php-stellar-sdk/pulls).

Please send all security issues to .

License
-------

[](#license)

This project is open source and available freely under the [MIT license](LICENSE.md).

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 91.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~28 days

Recently: every ~47 days

Total

13

Last Release

2795d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f9d833b8c4a8c06e6689eb7017ebf2fcf5cbad52c4e71211932af0361a0d06d2?d=identicon)[grandmotivator](/maintainers/grandmotivator)

---

Top Contributors

[![zulucrypto](https://avatars.githubusercontent.com/u/29358017?v=4)](https://github.com/zulucrypto "zulucrypto (235 commits)")[![grandmotivator](https://avatars.githubusercontent.com/u/34159182?v=4)](https://github.com/grandmotivator "grandmotivator (15 commits)")[![omarfurrer](https://avatars.githubusercontent.com/u/24496297?v=4)](https://github.com/omarfurrer "omarfurrer (3 commits)")[![tholder](https://avatars.githubusercontent.com/u/41235?v=4)](https://github.com/tholder "tholder (1 commits)")[![mariohuq](https://avatars.githubusercontent.com/u/15021607?v=4)](https://github.com/mariohuq "mariohuq (1 commits)")[![cmichi](https://avatars.githubusercontent.com/u/241530?v=4)](https://github.com/cmichi "cmichi (1 commits)")[![cballou](https://avatars.githubusercontent.com/u/166784?v=4)](https://github.com/cballou "cballou (1 commits)")

---

Tags

apiblockchaincryptocurrencyhacktoberfesthorizonphpphp7sdkstellarstellar-network

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/opensourcewebsite-org-php-stellar-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/opensourcewebsite-org-php-stellar-sdk/health.svg)](https://phpackages.com/packages/opensourcewebsite-org-php-stellar-sdk)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[soneso/stellar-php-sdk

Stellar PHP SDK for the Stellar Network

4048.2k4](/packages/soneso-stellar-php-sdk)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
