OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Simple WEB3 Php

Simple WEB3 Php is an open-source PHP library for interacting programmatically with the Ethereum blockchain and ecosystem through a node endpoint.

Independent OpenViST project profile, based on linked sources.

Simple WEB3 Php — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when a PHP application needs an Ethereum interface and the team wants built-in transaction, account, ABI and contract helpers.

Who it is for

  • PHP developers building server-side software that needs Ethereum data or transactions.
  • Teams integrating smart-contract calls, events or account utilities into PHP applications.

Documented uses

  • Make Ethereum JSON-RPC calls and batch requests.
  • Sign and send transactions, and work with accounts and messages.
  • Encode and decode ABI data, call contracts, send contract transactions and retrieve filtered event logs.
  • Convert blockchain numeric values and format ether denominations.
Before you choose

Requirements & limits

The repository presents Composer installation instructions and an MIT license.

  • Requires PHP 7.4 or later and a configured Ethereum node endpoint for the documented connection pattern.
  • The library supports read calls without setting personal account data, while sending transactions requires account address and private-key data.
  • The README notes that most numeric call results are hexadecimal or BigNumber values and that many numeric inputs are expected as BigNumbers.
  • The documented feature set includes batch calls, ABI v2, contract events and EIP-712 typed structured-data hashing.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Simple-Web3-Php with Composer

Add the stable Simple-Web3-Php release to a PHP project.

Before you start

  • PHP 7.4 or later
  • Composer

Steps

  1. From the project directory, run composer require drlecks/simple-web3-php "^0.10.0".

  2. In PHP code, import SWeb3\SWeb3 and create an instance with an Ethereum node URL, for example: $sweb3 = new SWeb3('http://ethereum.node.provider:optional.node.port');

Expected outcome

The stable package is added through Composer, and PHP code can initialize the library's main Web3 object with a node URL.

Guide limitations

  • The instance setup alone does not perform a blockchain request.
Source-based practical guide

Read the Ethereum block number

Use an initialized Simple-Web3-Php instance to request the current block number.

Before you start

  • PHP 7.4 or later
  • Simple-Web3-Php installed with Composer
  • An Ethereum node URL

Steps

  1. Import SWeb3\SWeb3 and initialize it with an Ethereum node URL.

  2. Call $res = $sweb3->call('eth_blockNumber', []);.

  3. If a numeric BigNumber representation is needed, import SWeb3\Utils and convert the result with $bigNum = Utils::hexToBn($res->result);.

  4. Convert the BigNumber to a readable string with $s_number = $bigNum->toString();.

Expected outcome

The library requests the block number and, optionally, converts the returned hexadecimal result to a BigNumber and then a string.

Guide limitations

  • The README notes that many calls return hexadecimal or BigNumber values and that most numeric parameters are expected as BigNumbers.
  • A working Ethereum node connection is needed; node setup and error handling are not described.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
drlecks/Simple-Web3-Php · Official homepage title · retained in its source language