Description
php-tkui is a library for building native desktop applications with PHP alone. It uses PHP's FFI extension to call Tcl/Tk, a long-established toolkit for desktop interfaces, so you do not need to compile or install other PHP extensions. The README lists the requirements: PHP 8.2 or later with the FFI extension enabled, and Tcl/Tk 8.6 or later on the system. On Debian and Ubuntu you install Tcl/Tk with apt, check that FFI is enabled, and then clone the repository and try the demos. Configuration is done through a .env file copied from .env.example. A debug mode prints the commands sent to the Tcl engine to the console or to a file, and an appearance setting picks a theme such as clam, alt, default or classic. On Windows, you install a Tcl/Tk binary distribution and point the .env file at its DLLs, and the repository includes a guide for building your own Tcl/Tk. On macOS you install Tcl/Tk with Homebrew and set the path to its dylibs in .env. The project is public on GitHub and includes a contributing section.…
Highlights
- Desktop UI built with PHP only
- Uses PHP FFI and Tcl/Tk, no extra extensions
- Debug mode shows Tcl commands
- Selectable themes, including Windows native themes
- Runs on Linux, Windows and macOS
Ratings & Reviews
No ratings yet
Be the first to rate PHP Tkui.
People also visit
PHP Tkui FAQ
What is php-tkui?
A library for building native desktop user interface applications in PHP, using Tcl/Tk through PHP's FFI extension.
What do I need installed?
PHP 8.2 or later with the FFI extension enabled, and Tcl/Tk 8.6 or later.
Which operating systems are supported?
The README covers Debian and Ubuntu, Windows and macOS, with setup steps for each.
How do I try it?
Install Tcl/Tk, confirm FFI is enabled, clone the repository and run the demos.
Can I change the look?
Yes. Set the THEME option in .env to clam, alt, default or classic, or to winnative, xpnative or vista on Windows.
What are the best PHP Tkui alternatives?
Popular alternatives to PHP Tkui include Desktop, Desktop and Ttkbootstrap. See all PHP Tkui alternatives




