utopia-php/system

A simple library for obtaining information about the host's system.

Maintainers

👁 eldadfux

Package info

github.com/utopia-php/system

pkg:composer/utopia-php/system

Statistics

Installs: 307 716

Dependents: 8

Suggesters: 0

Stars: 25

Open Issues: 2

0.10.2 2026-05-05 14:33 UTC

Requires

  • php: >=8.0.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 04229a822b147c1abaf1a92fb42c2d7aad4625df

  • Eldad Fux <eldad.woop@appwrite.io>
  • Torsten Dittmann <torsten.woop@appwrite.io>

frameworkphpsystemupfutopia


README

Important

This repository is a read-only mirror of the utopia-php monorepo. Development happens in packages/system — please open issues and pull requests there.

👁 Build Status
👁 Total Downloads
👁 Discord

Utopia System library is a simple and lite library to obtain information about the host's system, and provides an easy way to detect on which CPU architecture your code is running. This library is aiming to be as simple and easy to learn and use. This library is maintained by the Appwrite team.

Although this library is part of the Utopia Framework project it is dependency free and can be used as standalone with any other PHP project or framework.

Getting Started

Install using composer:

composer require utopia-php/system

Init in your application:

<?php

require_once __DIR__ . '/../../vendor/autoload.php';

use Utopia\System\System;

echo System::getOS(); // prints "Linux" for example
echo System::getHostname(); // Your hostname
echo System::getArch(); // x86_64
echo System::getEnv('MY_ENV_VAR'); // test

echo System::isArm(); // bool
echo System::isPPC(); // bool
echo System::isX86(); // bool

System Requirements

Utopia Framework requires PHP 8.0 or later. We recommend using the latest PHP version whenever possible.

Supported Methods

getCPUCores getCPUUsage getMemoryTotal getMemoryFree getDiskTotal getDiskFree getIOUsage getNetworkUsage
Windows
MacOS
Linux

Authors

Eldad Fux

Torsten Dittmann

Copyright and license

The MIT License (MIT) http://www.opensource.org/licenses/mit-license.php