2
It looks like something from another planet, but I would like to see a current language doing old things, like a PHP doing a Clipper-style application, the one with screens with simple lines, but very efficient at the time.
I will not get into the difficulty merit or feasibility, I already make applications desktop with PHP in intranets and I’ll tell you something, joining jQuery and CSS with PHP can do a lot of things.
I know I can run PHP command line and I already do this on Linux Cron, but I would like to go further, create applications with interfaces like Clipper, Cobol and others of the old era, rsrs
It is possible, there are libraries for it?
The efficiency of the Clipper is the robustness of the language, not the "Simple Screen" (so much so that the modern successor of the Clipper is the Harbour, which goes very well today, and leaves any PHP in the slipper). The fact is that if you treat the console by PHP in the same way as the General Terminal of the Clipper, you will achieve "similar" things, but the lack of specialization of PHP in commercial applications will always get in the way. In particular, the reading of keys, and display coordinates, lack of native type of date, etc. In short: make console application in PHP for user interaction is commonly go backwards.
– Bacco
Um, very productive for me this discussion, I had no idea how complex it can be to use php for a console application.
– Marcelo
It’s not about complexity, it’s more about the fact that it wasn’t meant to be. In Harbour you will generate an executable that does everything, and the language was thought of in commercial application. PHP was made for scripts, there is no "soul" of thing that is running in loop, although possible. I’ve seen two or three applications made in PHP for "continuous use", very well written (without the nonsense of wanting to use OOP for nothing in scripting language), but they are rarities. Until recently Guerrillamail’s SMTP was pure PHP. And the code is an example of real programming. The fact is that these cases are exception
– Bacco
In time: the criticism of PHP is only in the context mentioned. I regularly use PHP for PHP things: scripts for low and medium demand web applications, for fast delivery and ease of maintenance, no problems. It’s like having that friend who’s a know-it-all, drink-it-all, forget-it-all once in a while, but how well you know him, you know where and when you can count on him and when you can’t, so there’s no room for trouble, and get along with him.
– Bacco
Search libraries that allow you to use Ncurses from PHP
– epx