There is no license information available for the latest version (v1.1.1) of this package.

General useful PHP7 Library

v1.1.1 2017-01-08 18:10 UTC


This branch/lib is only for PHP7.


Install the latest version with

composer require sgc-fireball/libphp


  • Event management
  • PCNTL Signal handling
  • Color convertions
    • rgb2hsv
    • rgb2hsl
    • rgb2hex
    • rgb2cmyk
    • rgb2xterm
    • hsv2rgb
    • hsv2hex
    • hsv2hsl
    • hsv2cmyk
    • hsl2rgb
    • hsl2hex
    • hsl2cmyk
    • hsl2hsv
    • hex2rgb
    • hex2hsl
    • hex2cmyk
    • hex2hsv
    • cmyk2rgb
    • cmyk2hsl
    • cmyk2hex
    • cmyk2hsv
    • xterm2cmyk
    • xterm2hex
    • xterm2hsl
    • xterm2hsv
    • xterm2rgb
    • xyb2rgb (testing!!!)
    • rgb2xyb (testing!!!)
  • FTP wrapper
  • generic TCP client
  • generic UDP client
  • SSDP client (Simple Service Discovery Protocol)
  • generic TCP server
  • generic UDP server
  • WebSocket Server
  • SSDP server (Simple Service Discovery Protocol)
  • SSL server validator (using openssl)
  • file wrapper and multiprocess safe file wrapper
  • geoip for ipv4 and ipv6 (based on country codes via ripe database)
  • interval manager (setinterval in js)
  • timer manager (settimeout in js)
  • linux daemon component
  • multi processing manager with processlist administration
  • multiprocessing shared storage via SHM or filesystem.
  • fifo buffer
  • filo buffer
  • ring buffer
  • csv wrapper
  • ipv4 and ipv6 calculation
    • subnetting and supernetting
  • generic struct object
  • url decoder and encoder
  • xml decoder and encoder
  • php based incoming network sniffer (icmp, tcp, udp)
  • homematic binrpc decoder/encoder
  • redis message queue


TCP Echo Server

Start the TCP Echo Server in Console 1:

cd ./libphp
php bin/example.php example:echoserver --help
php bin/example.php example:echoserver --listen --port 12345

Start another Console to connect to TCP Echo Server:

telnet 12345

SSL Verify

A single console command to run ssl verification:

cd ./libphp
php bin/sslverify.php --port=443


Run all tests

cd ./libphp
composer test

Test it with PHP Code Sniffer

cd ./libphp

Test it with PHPUnit

cd ./libphp

Test it with PHP Copy/Paste Detector

cd ./libphp
bin/phpcpd src/

Test it with PHP Mess Detector

cd ./libphp
bin/phpmd src/ text cleancode,codesize,controversial,design,naming,unusedcode --suffixes php



Richard Hülsberg - -