PHPackages                             nawab69/web3php - 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. nawab69/web3php

ActiveLibrary[API Development](/categories/api)

nawab69/web3php
===============

A simple PHP package to interact with the Ethereum web3 API

4231[1 issues](https://github.com/nawab69/web3php/issues)PHP

Since Dec 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nawab69/web3php)[ Packagist](https://packagist.org/packages/nawab69/web3php)[ RSS](/packages/nawab69-web3php/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Web3PHP
=======

[](#web3php)

A PHP/Laravel wrapper around web3 JavaScript API.

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

[](#installation)

```
composer require nawab69/web3php
```

### Further steps for Laravel

[](#further-steps-for-laravel)

When using Laravel, add the following lines to your `config/app.php`

```
'providers' => [
    ...
    Nawab69\Web3PHP\Providers\Web3PHPServiceProvider::class,
    ...
],
'aliases' => [
    ...
    'Ethereum' => Nawab69\Web3PHP\EthereumFacade::class,
    ...
],
```

then generate the config file

```
# When using Laravel
php artisan vendor:publish
```

And edit your .env file with the following values

```
WEB3_URL='127.0.0.1'
WEB3_PORT=8545

```

Usage
-----

[](#usage)

This example shows you how to get the balance for a given address.

### Laravel with facades

[](#laravel-with-facades)

```
$eth = Ethereum::eth_getBalance('0x8fbb99e9e73cd62bb3adea5365ff0f9d90c9e532')
print $eth // Prints the account balance in hex.
```

### PHP

[](#php)

```
$eth = new \Nawab69\Web3PHP\Ethereum($url, $port);
$eth = $eth->eth_getBalance('0x8fbb99e9e73cd62bb3adea5365ff0f9d90c9e532', $block='latest', $decode_hex=false);

print $eth // Prints the account balance in hex.
```

This is updated version of Laravel 8.0 Support added

Full reference:

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/44573643?v=4)[Nawab Khairuzzaman Mohammad Kibria](/maintainers/nawab69)[@nawab69](https://github.com/nawab69)

---

Top Contributors

[![nawab69](https://avatars.githubusercontent.com/u/44573643?v=4)](https://github.com/nawab69 "nawab69 (4 commits)")

### Embed Badge

![Health badge](/badges/nawab69-web3php/health.svg)

```
[![Health](https://phpackages.com/badges/nawab69-web3php/health.svg)](https://phpackages.com/packages/nawab69-web3php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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