Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
chadd1746437yI don't know how it compares in speed, but Python's syntax is vastly cleaner and easier.
-
No No No! HTTP requests can be made using AJAX also! i m asking wether python does make up the HTTP requests without ajax?
-
simus2467yis this you looking for?
http://docs.python-requests.org/en/...
or maybe this
https://docs.python.org/3/library/... -
chadd1746437ySure, I guess. Python isn't structured like PHP. It isn't embedded directly into webpages. It's more general. PHP is mostly intended to be used for web servers. Python can do that and other things.
-
@yashlalwani Thats up to you, python doesn't know what a web request or ajax is (There are libraries and frameworks for python that do, or you could write your own that works in whatever way you feel is appropriate).
In general python is slightly slower than PHP(7) but for complex web applications it tends to be faster anyway since it can keep the application data between requests (unless you use a retarded web framework that starts from scratch on each request) -
Python is more general purpose than Php where Php is aimed at server side.
Not sure Python is faster though. -
I would say, if you develop for the web, stay with PHP (7). It is intended for that.
-
@tracktraps if you develop for the web as it was in 2004 then yes, PHP7 is made for that.
-
@ItsNotMyFault Don't mix frontend with backend. PHP7 is absolutely fine for current and future projects. Most things happen anyway on the client side. (javascript, html5, css, ...)
-
@ItsNotMyFault You do realise PHP 7 came out about a year ago so it can't possibly be designed for 2004.
By all means criticize PHP but at least do it with the level of intellect expected from developers. -
@nblackburn Absolutely right. There are just people who hate PHP. Simply so, without reason.
-
SSDD47977y@nblackburn couldn't have said better myself. The comments regarding php and php7 are just ignorant. I've stopped acknowledging them.
-
@nblackburn
The share nothing / start each request from zero was sensible when websites were simple and "everyone" used shared hosting.
The modern web however doesn't work like that, it is built around persistent backend applications (usually running in containers)
PHP7 did not change anything in that regard, it made the language a bit less painful to use and improved performance slightly but the fundamental problem remains.
The closest you can get to a modern web backend with PHP is probably ReactPHP (And that is a pretty major hack that gets around the outdated web portion of PHP by running as one or more commandline processes(usually monitored and restarted as needed by a python script ....) that uses the low level socket library to manually handle incoming connections and requests. (Basically the same way web frameworks for C work except C is actually better suited for it)
Some say that Python is way better and fast than PHP. Is that true??
undefined