We can use PHP to make a desktop application, by adding GTK extension. These are what we have to do:
1. Prepare the file
Requirement:
- checkinstall
- php5-cli (PHP5 Command Line Interface)
- php5-dev
- libglib2.0-dev
- libgtk2-dev
Download PHP-GTK-20.beta.tar.gz
2. Unzip and get into the folder:
# tar xzf php-gtk-2.0.0beta.tar.gz
# cd php-gtk-2.0.0beta
3. Compile and Install
# ./buildconf
# ./configure
# make
# checkinstall
4. PHP-CLI configuration:
Add the following line in /etc/php5/cli/php.ini:
extension=php_gtk2.so
5. Testing
Make phpgtk_test.phpw in your home directory, and fill with these following lines:
<?php
$window = new GtkWindow();
$window->connect_object('destroy', array('gtk', 'main_quit'));
$dateTime = new GtkLabel(date('Y-m-d H:i:s'));
$window->add($dateTime);
$window->show_all();
gtk::main();
?>
Execute the file:
$ php phpgtk_test.phpw
The following window will appear:

More reference:
- pear.php.net