Been experimenting with php-gtk over the last few days. When I was trying to use a liststore, php threw a fatal error. “Undefined class constant ‘TYPE_STRING'”.
After testing the example from the PHP_GTK site I got the same errror. The PHP-GTK example is out of date. Starting with PHP-GTK 2.0.0 the TYPE constants were moved from the Gtk::class to Gobject, so use Gobject::TYPE_STRING instead.
Below is the correct code.

Leave a Reply

Your email address will not be published. Required fields are marked *