This should be one more comment, but it would be too long. And deep down it answers the question, which is probably opinionated (I don’t know if it should be open). But at least I answered about the use of GTK in PHP, which is what asks the question, and I tried to be fair and support the answer as it does, but I admit you have a little opinion
GTK
GTK is a set of access controls native to the window manager of some operating systems. It was originally made for Linux and ported to other Oses with greater or lesser degree of success. It is not a browser.
To say about advantages and disadvantages would have to compare with something else. I understand the request is about PHP-GTK and not pure GTK with other kits.
GTK (pure) is not one of the best control kits and window managers. It does not work well on Windows, especially in the version supported by PHP-GTK. But it can be used well, at least on Linux.
PHP-GTK
PHP-GTK comparing to PHP-Qt, wxPHP or other kits I don’t know, I don’t know users of these kits. Certainly they suffer from the same problems of PHP-GTK, including the lack of a community supporting them. One seems abandoned and the other almost.
Comparing with other language technology
If the comparison is with the use of the desktop in other languages, the comparison would be unfair. The only advantage I see in it is that the person who already knows PHP well stays in it. But that alone can be seen as a disadvantage as well, including for that person. Using the wrong tool in this case can be much more tragic than learning another language. Of course, if she doesn’t have the ability to learn another language, then whatever, anything will be bad. The list of disadvantages is huge and I quote some of them throughout the text, the most specific problems I can’t remember, it’s been a long time since I did this.
Web X desktop
The web and desktop programming templates are completely different. The adaptation is not easy. Learning a new language is easier than learning another way to program. And if one tries to program desktop as if it were web it will be tragic. The best part will be that it doesn’t work. Interestingly PHP even has some useful things for desktop that nobody uses for web. Then he will have to use things he has never heard of. PHP-GTK was not developed using the most modern features of PHP, which ironically would help a more desktop application. It’s show of horrors of wrong things with this.
The PHP execution environment was made to run scripts and has no facility that helps run an application desktop. On the contrary, it creates difficulties for this type of application, even in the php-win
, whose name fools well.
My experience
I have experience with this to make a puzzle. It was the worst decision I took in computing.
I used the same PHP-GTK version available today. The fact that there is no evolution after so long already shows how is a technology that nobody wants to invest.
PHP does not help
PHP is not a quality language and there are several fonts showing it. It is usable and can do quite interesting things with it. It’s not that she’s tragic, not recommendable, none of that. But you can’t compare it to other languages mainstream.
It is opinion, of course, I do not deny this, but it is based on extensive experience of actual use (and I’m passionate about languages in general, I devote a lot of my free time studying the workings of languages, I’m not a layman on the subject giving any opinion, even though I’m not a "doctor" on the subject) and many fairly detailed reports about it, among them, the linked in a comment by Bacco.
Inconsistencies in the question
As far as I know, PHP is not the language used to develop most of the web. If this is true, you need to present the data. I’ve seen some who show otherwise, but as they are not the most reliable nor will post. Mainly it is not the choice when the decision was made professionally. Even the best-known sites that started with PHP was like this because the founder didn’t know how to use anything else. And today they move to other things.
The problem with who evaluates anything is that whenever the person does not have enough information to do this, she is unable to assess her own condition and enters a vicious circle.
This phenomenon is known as golden hammer. People don’t deal well with information they dislike and she doesn’t usually notice this. PHP is not a panacea.
Popularity
The criterion that something that is widely used has quality leads to the conclusion that crack (is, phallus of stone) has quality, after all has many more users than PHP.
Most PHP users opted for this language because others opted for it (at the time it had nothing better web-based). It is a herd phenomenon and not a conscious decision phenomenon with well-defined scientific criteria. And it is very common that the choice has been made because it is what one has been able to learn (learning PHP is very easy, use not so much, but the first barrier is always what one clings to, does not look at what comes next, which is another reason for the decision to be wrong). Even absurdly there are higher education courses that use this language as a basic programming instrument, which makes me question the quality of the course. Obviously the student of this course will also be the one who will only know how to do what was taught in this bad course and will not create his own life, which should be the main goal of a higher course.
But if you’re going to use this as a definition criterion, then don’t use PHP-GTK, essentially nobody uses it and it’s a mostly abandoned and rather poorly planned project. There is no community support.
All the applications I have seen, even presented by the creators of this module, have always been very poorly made. Yes, if the programmer is good you can do something well in PHP, but for some reason nobody could demonstrate this with PHP-GTK. Always the person who takes it thinks he’s gonna do it better than the others. Maybe this is explained by "the people who chose to do something desktop with PHP are the worst programmers of this language", I don’t know. Even if it isn’t, most crack users are smart people who thought it would be good for them.
Even the most fanatical PHP users reject its use for desktop leaving it relegated to a few dripping cats who think they know more than others more experienced than them.
Mobile
PHP for mobile is almost a joke.
Support for what I say
The accepted answer basically says the same thing I said here. At the beginning the answer talks about some points about the comments and what I wrote. This part is very confusing, mixes things up, makes uncountable comparisons, has no basis, has contradictions and even runs away from common sense, shown until lack of understanding of some spoken subjects.
The part that talks about PHP-GTK is good and puts some points that I had not put. I highlight:
(PHP it is a scripting language, so everything else is done by curious
This is a great truth. Too bad a lot of people think that’s not it. And software with GUI are usually not scripts.
I started the move to start php-gtk3
That’s right, they stopped in PHP-GTK 2, which in passing is not so stable and the community itself admits it.
In my experience PHP-GTK is a hobby. I wouldn’t do anything professional like PHP-GTK.
I don’t question the use by hobby, i responded for professional use. No can, no one uses. The author of that answer who seems to like does not use and does not show someone who uses with success in quality professional applications.
It is very stable and there is a lot of documentation about PHP and GTK
My experience was different. See the PHP-GTK website and decide for you whether it is a technology that has community, attention, etc.
It is quick to make fronts that help in everyday life... is fast development, fast learning
This is characteristic of GTK and generally all Guis.
It’s stable, it’s not crashing out of nowhere
It’s not my experience, on the contrary.
Is really cross-platform
There are controversies, even among the most staunch advocates of the GTK.
Very receptive community
I have no doubt, there’s hardly anyone to cause trouble.
Outdated
Yes, very.
The themes for windows are horrible
It is difficult to use, it is not intuitive for this user, there are limitations and even things that do not work properly. The same occurs in Macos. And to a small degree if Linux uses KDE or another desktop manager.
It is slow as it is a bind of a lib running in a script
Exact.
A lot of people with no property speak very badly
Many with full ownership speak very badly. Including all who have tried and given up on technology. Not many people speak well. The author himself who tried to speak well only managed to say that it is not a suitable technology.
In October 2018 I spoke with Rasmus Lerdorf on Intercon and he said that PHP is a language for web backend, nothing else, there is no intention to support other scenarios.
Completion
Clearly its use is not recommended with PHP. With C and other languages (C++, JS, Perl, Python, Lua, maybe Java, among the best known), in Linux you can use well. But everyone can do what they want.
If you want to use GTK, use it, but with another language. PHP is good for web.
"PHP is a quality language, and a job can be done to make it a desktop language as well." - it’s actually not a quality language, and for desktop it has much better stuff. PHP is good for quick scripts, as people normally used for the web. To bring it to the desktop, you will only be walking backwards. It’s like opening and closing PC enclosure using cutting-edge knife. Maybe you’ll get pretty good at it, but using the right key will be more advantageous. For example, I have seen works of art made with MS Paint, but it is done by leisure. It would hardly become a profession.
– Bacco
I know that there are much better desktop languages that are focused on that platform. For me there is no bad language, and php is a quality language if it would not be used in the vast majority of wev dites. I want you to understand that it is not making PHP better than a Java or C# of life, but something useful in desktop development as well.
– Leonardo
I understood perfectly, but is that normally the defects of PHP were accepted on the web because at the time it was innovation, and better than the Asp of the time, which was practically the only other option. But I thought it was important to mention, because today PHP is trying to imitate things that already existed in languages at least 30 years ago, and without the same quality, and in the wrong concept. Like I said, you might do wonderful things with it. But it’s important to understand that you’ll always be behind. And it’s not just the language that counts, but the platform/Runtime that’s behind it.
– Bacco
Note that I am speaking without any prejudice, I use PHP normally. It was just an opinion based on what I know about technical implementation, not on taste. And this is not a criticism of your question, which may even give interesting answers. It was just a counterpoint to the excerpt that I highlighted.
– Bacco
Yes yes I understand, but I disagree to say that it is not a language of quality, it depends on which hands it is, in those who know how to use it correctly results in a quality work, in the others not so much. I see only as an extra fan that can be opened, not to become something professional, but to turn a branch, in desktop applications without having so much questioned as gtk.
– Leonardo
I’m just saying that PHP is extremely poorly done. The PHP functions are completely poorly elaborated, and even have a standard in the nomenclature and in the order of the parameters. I’m not saying that a code written in PHP cannot be well written (within what the language allows) It only depends on the hands of those who use it. It has code very well made in PHP, and this is the merit of the programmer who is using, and not the language. The article is not very good, but before leaving any answer, here is a summary: https://pt.wikipedia.org/wiki/PHP-GTK
– Bacco
Of curiosity, here is an article that gives an overview of PHP: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
– Bacco