Hub Culture Developer Portal


Hedera PHP SDK

  • Created : Nov, 01, 2025
  • Last Updated: Nov, 01, 2025

The hub/hedera-sdk-php package provides a clean and native PHP interface to interact with the Hedera Hashgraph network. It enables developers to integrate Hedera services into PHP applications within the Hub Culture code ecosystem with minimal setup or learning curve.

Package link on Packagist: https://packagist.org/packages/hub/hedera-sdk-php

Key Capabilities

This SDK allows developers to:

  • Connect to Hedera testnet or mainnet using a simple PHP client
  • Run account, transfer, token, file, and smart contract operations
  • Send and receive consensus messages
  • Avoid low level gRPC or protobuf complexity
  • Integrate Hedera into PHP based platforms and microservices efficiently

Installation

composer require hub/hedera-sdk-php

Example


require 'vendor/autoload.php';

use Hub\HederaSdk\Client;

$client = Client::forTestnet();
$client->setOperator($accountId, $privateKey);

$response = $client->transfer()
    ->from($fromAccountId)
    ->to($toAccountId)
    ->amount(1000)
    ->execute();

echo "Transaction receipt: " . $response->getReceipt();
                

Best Practices

  • Start development on testnet before moving to mainnet for production
  • Store account IDs and private keys securely in environment variables
  • Monitor transaction fees and performance when running high volume operations
  • Keep the package updated to remain aligned with latest Hedera network updates

Visit the package link above for version history and installation details. More usage examples and extended documentation will be added to this page as the package evolves.