
 PHP-GTK


Auch Applikationen mit grafischer Oberflche sind mit PHP mglich. Realisiert wird dies durch die Anbindung von GTK an PHP.

/*
 * Create a new top-level window and connect the signals to the appropriate
 * functions. Note that all constructors must be assigned by reference.
 */
$window = &new GtkWindow();
$window->connect('destroy', 'destroy');
$window->connect('delete-event', 'delete_event');
$window->set_border_width(10);

/*
 * Create a button, connect its clicked signal to hello() function and add
 * the button to the window.
 */
$button = &new GtkButton('Hello World!');
$button->connect('clicked', 'hello');
$window->add($button);

Grafische Oberflchen knnen auch mit Hilfe von Glade erstellt und anschlieend in PHP genutzt werden.
