Skip to content
Doi edited this page Sep 10, 2026 · 8 revisions

vygu

Vygu is a cross-platform PHP library which gives GUI support for your PHP programs. It uses FFI to connect to a backend (e.g WinApi or GTK).

Installation

You can either

  • Download a release archive,
  • Clone with git: git clone https://github.com/Doi6doi/vygu.git
  • Use composer: composer require doi6doi/vygu

Once you have the source, you only need to require the autoload.php of vygu. It will autoload all needed vygu classes from the \vygu namespace. You will need at least PHP 7.4, and on some PHP installations you might need to explicitly enable FFI in php.ini.

Examples

Examples are a fast way to learn. Here are some for vygu:

  • hw.php: Hello world GUI program (in only 6 code lines)
  • calc.php: A simple calculator with label, buttons and key events

Reference

You can browse detailed class specifications in the Reference

Supported platforms

  • Linux - GTK4
  • Windows - WinApi

Clone this wiki locally