i remember seeing somewhere that Python was kinda like the next stage of PHP but when i tried to learn it my mind was blown. Im looking to learn a programming language between these two so i was wondering is there a definite better one? or are they both for separate things?
I prefer PHP, for the sole reason I can't get used to the bracketless syntax (and haven't tried too hard). Which is strange considering the first languages I learned were VB6 and Ruby for RPG Maker - both bracketless languages. Python can also more easily be used for a wider variety of applications - desktop, web etc and there is even an implementation for .NET programming on Windows, though it doesn't see much use. PHP is easy to learn, use and for web applications will do everything that Python can. Plus its better documented and so very widely supported.
The choice of language mostly depends on the purpose for which you will be using it. Some languages are better suited for some specialized purposes than other. Both PHP & Python are popular languages. If you are new to programming and you are asking for the easiest to learn among two of the languages, then i will say, both are easy to learn. I am not sure, but you might find learning Python a bit more easy though, if you are fine with indentation based syntax. Python codes are readable and syntax will feel like plain English than many of other languages. In python you use indentation instead of curly braces to define code block. On the other hand, if you have programmed with C like languages, then you will feel comfortable with PHP, because many of the PHP's syntax is borrowed from C and Java (specially OOP features). Both PHP & Python are scripting languages. Python is strictly Object Oriented, strictly typed and also dynamic language. On the other hand, PHP allows you to code in both procedural style and object oriented style, in fact many of the code you will find are written in procedural style, because it is the easiest way to get something done quickly, which turns out not bad every time, but for bigger projects, its become sometimes a great pain if the code is not written in proper way. In fact, one of the biggest complain about PHP is it's forgiveness about poorly written code, and thus a huge number of developers don't maintain coding convention and produce bad code. PHP is also loosely typed and dynamic. But if coding convention is maintained, then you can produce quality code. Python is a general purpose language, but PHP is specialized for web purposes. But python is also popular among web developers, the Django framework is one of the most popular web framework. Hope it gives you some idea, if you can ask some specific questions, then i will be happy to answer, i have been using both for many years.
Python is not next stage of PHP, just take a look at their syntax. If you learn PHP then you can easily (well, to the degree) program in all C-like languages like C/C++/C#/Java, even in Javacript it is not true for python best regards
Like the post above, python is not a next version of php nor shall it be, python is used for robotics if I'm correct, where as PHP is for server side.
Except from their syntax stuff, both languages are strong scripting languages. PHP is more known for web-development and has been used a lot over the years. On the other side, Python is so powerful language with a great community's support. You can do almost anything and you can find almost anything that you need. I would definitely go with python, even if its web-syntax and modules may seem weird in the begin. Also, php has been blamed for having lots of disadvantages on serious web development, I am not sure for that though. Currently, I am using both but I would rather doing everything in Python.
HI ! PHP is a language that's made for the web. You can make GTK and CLI applications with PHP, but it's mainly used for websites. Python is used for a lot of stuff like websites, webservers, game frameworks, desktop and CLI application, IDEs and a lot more. There's also a huge difference in the syntax. PHP has a syntax that's like C with curly braces for loops and whitespace is ignored. Python doesn't have curly braces, instead the level of indention of blocks of code are important. Both languages are easy to learn. It just depends on what you want to do.
I work as PHP Dev, but I like Ruby( with Rails), I have interest in Python ( with Django) but havnt had the time to learn it. Python is a great language, I think people would consider it better than PHP.
PHP is easier to learn than Python, I think. In addition to that, PHP is widely used for web programming which is what the industry needs nowadays. But as I've experienced, Python is a cute language. It's like Java which is object-oriented. I so like the turtles in Python.
Python and PHP are bit different, PHP is web programming language where as with python you can develop webs, computer apps and even mobile apps for android. Well, php is very largely supported for web development but python is much use in computer app programming
I would recommend you to go with python. It is better than PHP. Trust me. I experienced it. Python is faster than PHP and also it support re usability of codes. Recently I have read an article "How does a Python web development overcomes the PHP". Go through the article you'll get a better idea. Article: http://storify.com/rokesh/how-a-python-web-development-does-overcomes-the-ph
I actually made the switch from PHP to Python and I must say I love it, although it was a little bit hard to grasp as it most things at first, I quickly learnt and the transitions was actually smooth - I've been programming in python for about a year now, and I had about 4-5 years of experience with PHP so I must say it was rather easy with knowing logic as it is some what similar with a few exceptions. Most people don't like the fact that you have to indent your code i actually like it it helps keep the code clean. Look up hacked existence on Youtube django tutorials.
I think both are good for web development. I have experience in PHP which is a server side language to develop web application. But Python is used for both web and desktop applications. Its also available on windows is added advantages.
While I don't argue that Python might be faster and "better" than PHP in a lot of cases, the article you linked to is a joke. It's not "discussing" anything, it's plainly pumping Python for everything, without looking at pros and cons, and the language is abysmally bad. I'm pretty sure there are a LOT better comparisons between Python and PHP out there, in actual English, instead of ... whatever that was.
I think the comparing of languages are not good because every language has its own positives and negatives also. So when comparing with php and others, php is very simple and just like c and cpp languages so even a laymen can work with php... i think its is very best...
like sarah said - each of them has a different goal. PHP is preferred for web-server programming and Python is preferred for fast fixes, calculations, fast development (or PoC) etc.
I think you mean pimping... though what you said is kinda funny. It does kinda read like a discussion between Yoda and Zathras...hell I've seen Google translate make less of a mess than that! ...and yeah, once you get past the broken moist goodry Engrish, it literally doesn't actually seem to say anything meaningful, and is instead doped to the gills with glittering generalities and card stacking... many of it's "Features of Python" also being true of PHP... It's like saying "Elect Harper, a real American" -- what makes Harper a real American? Born here, raised here, pays taxes -- same could be said for who he's running against. It's not a feature when everyone else has it too... I just don't get the appeal of Python... at all. while I'm a stickler for good indentation habits and as such should like formatting controlling flow, the entire language to me feels like the WORST of dead languages from the '70's and '80's -- like Fortran, line-numbered BASIC or even Prolog. The inclusion of an immediate mode reeks of ROM BASIC, the lack of assignment operators reeks of stack-style FORTRAN crap everyone hated 30 years ago, and it's vague flow control / logic reminds me of everything that was wrong with Prolog... and that's before talking about how anything written in it looks like the programming equivalent of 1337. It is needlessly and pointlessly cryptic for no reason I can fathom apart from wanting to appeal to the "WAH, WAH, WAH, I DON'T WANNA TYPE" wankers. Probably why the Raspberry Pi community and I got along like sodium and water... I can't believe they call that cryptic, "designed to make you make errors" language "ideal for beginners" -- ON WHAT PLANET!?! Though it could be worse, could be RUST -- the programming language for people who can't be bothered to type 'function' or 'else if' while at the same time want to drag 'LET' back from the dark ages of computing -- all while thinking C++ is a little too cryptic for it's own good; which is akin to saying the Spanish Inquisition and Nazi Holocaust is a little too warm and fuzzy for one's tastes. After some 35 years of programming languages like RUST and Python -- which make hand compiling machine language seem simple, clear and verbose -- just don't make any sense to me; I fail to see the appeal. But what do I know? I'm one of those Wirth language nutters.
@deathshadow - Wow. NEVER seen ANYONE crying THAT MUCH because of Python / RUST / even hand-programming machines.. You took it way too far man. Maybe you should see someone!
@deathshadow - you have the worst analogy I have ever read in my entire life, it honestly made my head hurt.