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 3w 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

Maturity32

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

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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