Python vs PHP vs Java

Which is the most difficult to learn, Python, PHP or Java?

  • Python

    Votes: 10 15.4%
  • PHP

    Votes: 7 10.8%
  • Java

    Votes: 48 73.8%

  • Total voters
    65

Jack_Sparrow

Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    You can't compare php as its just for web. Yes its easy to learn it as well.
    If we take python vs java as proper high level programing languages

    Java is hard to learn and complex which has other so many benefits.

    Main difference is Python is an interpreted language and Java is a compile language :)


    There are lot of programing language concepts ;) Anyway there is a programing language developed by Sri Lankans called Ballerina
    https://ballerina.io/
     
    Last edited:

    imhotep

    Well-known member
  • Mar 29, 2017
    14,823
    8
    35,324
    113
    For a beginner PHP and Python will be easier than Java. Also the PHP market is on the decline and Python is picking up. Python has several libraries that can support many applications. In fact, Data scientists do prefer Python over Java.
     
    • Like
    Reactions: OrangeHat

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    For a beginner PHP and Python will be easier than Java. Also the PHP market is on the decline and Python is picking up. Python has several libraries that can support many applications. In fact, Data scientists do prefer Python over Java.

    Yes learning only php is not good better to familiar with JS and things like react, angular and node.

    Python has a different market with ML and data science. Since its easy to learn even Data Scientists prefer to learn, you don't need to be a coding geek.

    Still Java and even C# applications has different market where most of the enterprise applications are written using them :)
     

    imhotep

    Well-known member
  • Mar 29, 2017
    14,823
    8
    35,324
    113
    Yes learning only php is not good better to familiar with JS and things like react, angular and node.

    Python has a different market with ML and data science. Since its easy to learn even Data Scientists prefer to learn, you don't need to be a coding geek.

    Still Java and even C# applications has different market where most of the enterprise applications are written using them :)
    Of course yes... at that level specially when application scaling is needed. Java is going to stay, though every now and then it dips but keeps on rebounding.
    For a beginner learning PHP and Python will be easy - that's the question raised.
     

    thilina.rp

    Well-known member
  • Dec 10, 2014
    5,653
    769
    113
    Rust eka issarahata awilla thiyawna dakkada community eka athule stack eke balapan.. year eken bagayak yaddith ohoma nam iwara weddi kohoma weyida.
     
    • Like
    Reactions: OrangeHat

    lakziro

    Well-known member
  • Mar 19, 2018
    390
    580
    93
    පයිතන් තමා බ්‍රදර්. අපි ඉන්නේ 2020 සේ. නැතුව බිෆො 2015 නෙවේ. මෙව්වා දැන් ML AI Data science deep learning wage දේවල් එක්ක දුවන්නේ . අනිත් එව්වා ඉගෙන ගෙන උබලා ෆාමසි මැනගෙමන්ට් සිස්ටම් ගහ ගහ ඉන්නද ජීවිතකාලෙම. අවුලක් නෑ ඒත් බන් උබලා දන්නේ උබලාගෙ ඩ්ගී එක ගන්න කොස් එකේ කරන ටික විතරනේ. එතනින් එහා මොනාද තියෙන්නේ කියලා බලන් නෑනේ. පව් ඕයි.


    Stact ගනින් ඔක්කොම දුවන්නේ පයිතන්. පයිතන් කියන්නේ කඩුවක් වගේ තමා ඕනි පැත්තකට කෙටුවෑකී.

    දැන් ඉතින් ලෙජන්ඩ්ලා ටික රෙද්ද උත්සන් එන්න එපා ඈ. ඔයාලත් ස්ටේබල් නේ පොඩ්ඩක් move වෙලා එහෙම අනිත් language ගැන එහෙම බලන්න පොඩ්ඩක් වත් කැමති නෑනේ.

    'අපිට ඉගැන්නුවෙ මොනාද .. ජාවා
    එහෙන්ම් අපී හැම දේම මැරෙන කම් කරන්න ඔනී මොකෙන්ද?.. ජාව වලින්'

    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    නැත්තන් ෆාමසි සිස්ටම් හදලා වර්ටුසා වගේ එකක කබුරපන් ගිහින් ඒක සෝක්. කොමත් උබලා කැමති ස්ටෙබල් ලයිෆ් එකකටනේ.
     

    Edward Kenway

    Well-known member
  • Jan 8, 2015
    12,350
    13,952
    113
    පයිතන් තමා බ්‍රදර්. අපි ඉන්නේ 2020 සේ. නැතුව බිෆො 2015 නෙවේ. මෙව්වා දැන් ML AI Data science deep learning wage දේවල් එක්ක දුවන්නේ . අනිත් එව්වා ඉගෙන ගෙන උබලා ෆාමසි මැනගෙමන්ට් සිස්ටම් ගහ ගහ ඉන්නද ජීවිතකාලෙම. අවුලක් නෑ ඒත් බන් උබලා දන්නේ උබලාගෙ ඩ්ගී එක ගන්න කොස් එකේ කරන ටික විතරනේ. එතනින් එහා මොනාද තියෙන්නේ කියලා බලන් නෑනේ. පව් ඕයි.


    Stact ගනින් ඔක්කොම දුවන්නේ පයිතන්. පයිතන් කියන්නේ කඩුවක් වගේ තමා ඕනි පැත්තකට කෙටුවෑකී.

    දැන් ඉතින් ලෙජන්ඩ්ලා ටික රෙද්ද උත්සන් එන්න එපා ඈ. ඔයාලත් ස්ටේබල් නේ පොඩ්ඩක් move වෙලා එහෙම අනිත් language ගැන එහෙම බලන්න පොඩ්ඩක් වත් කැමති නෑනේ.

    'අපිට ඉගැන්නුවෙ මොනාද .. ජාවා
    එහෙන්ම් අපී හැම දේම මැරෙන කම් කරන්න ඔනී මොකෙන්ද?.. ජාව වලින්'

    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    නැත්තන් ෆාමසි සිස්ටම් හදලා වර්ටුසා වගේ එකක කබුරපන් ගිහින් ඒක සෝක්. කොමත් උබලා කැමති ස්ටෙබල් ලයිෆ් එකකටනේ.

    ඊයේ පෙරේදා ඔන්ලයින් කෝස් කට්ටක් කරලා language එකක් ඉගනගෙන අනික් established languages ඔක්කොම දැන් "dead" කියන මෝඩ යාලුවෙක් අපි හැමෝටම ඉන්නවා :rofl:
     

    Jack_Sparrow

    Well-known member
  • Jun 16, 2008
    42,522
    1
    16,927
    113
    Black Pearl
    පයිතන් තමා බ්‍රදර්. අපි ඉන්නේ 2020 සේ. නැතුව බිෆො 2015 නෙවේ. මෙව්වා දැන් ML AI Data science deep learning wage දේවල් එක්ක දුවන්නේ . අනිත් එව්වා ඉගෙන ගෙන උබලා ෆාමසි මැනගෙමන්ට් සිස්ටම් ගහ ගහ ඉන්නද ජීවිතකාලෙම. අවුලක් නෑ ඒත් බන් උබලා දන්නේ උබලාගෙ ඩ්ගී එක ගන්න කොස් එකේ කරන ටික විතරනේ. එතනින් එහා මොනාද තියෙන්නේ කියලා බලන් නෑනේ. පව් ඕයි.


    Stact ගනින් ඔක්කොම දුවන්නේ පයිතන්. පයිතන් කියන්නේ කඩුවක් වගේ තමා ඕනි පැත්තකට කෙටුවෑකී.

    දැන් ඉතින් ලෙජන්ඩ්ලා ටික රෙද්ද උත්සන් එන්න එපා ඈ. ඔයාලත් ස්ටේබල් නේ පොඩ්ඩක් move වෙලා එහෙම අනිත් language ගැන එහෙම බලන්න පොඩ්ඩක් වත් කැමති නෑනේ.

    'අපිට ඉගැන්නුවෙ මොනාද .. ජාවා
    එහෙන්ම් අපී හැම දේම මැරෙන කම් කරන්න ඔනී මොකෙන්ද?.. ජාව වලින්'

    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    නැත්තන් ෆාමසි සිස්ටම් හදලා වර්ටුසා වගේ එකක කබුරපන් ගිහින් ඒක සෝක්. කොමත් උබලා කැමති ස්ටෙබල් ලයිෆ් එකකටනේ.

    Metana weradi dewal tikak tiyanawa bro
    Kawadawat eka language ekak igena gena wedak naha eka piligannawa

    Java igena swing app hada hada hitiyoth uba kiyana pharmacy app hadanne
    habai java walin enterprise apps wenama hadanawa, specially backends
    godak Rest services dan nam microservices owa godak java walin liyanawa

    Danata tiyana products thawa awurudu 10k 15k giyath rewrite karanne naha eka nisa loweth Java C# demand eka tiyanawa

    Uba sirawata cloud platform athule weda karanawanam uba Go wage language igenaganna eka hodai, nattam rust :)
    habai python walin enterprise back ends mama danna taramin godak naha

    Python walin ML AI sira weda tikak karaganna puluwan, e wage wedak karana ekek Java OOP concepts igenaganna eka therumak naha
    E paththen yana ekekta, loweth python igenaganna eka hodai. habai always job market eka balana eka hodai ;)

    Math Go igenagatta eth lankawe Go kochchara sira unat jobs naha :P
     

    lakziro

    Well-known member
  • Mar 19, 2018
    390
    580
    93
    ඊයේ පෙරේදා ඔන්ලයින් කෝස් කට්ටක් කරලා language එකක් ඉගනගෙන අනික් established languages ඔක්කොම දැන් "dead" කියන මෝඩ යාලුවෙක් අපි හැමෝටම ඉන්නවා :rofl:
    හා හා බ්දර් language එකට නෙවෙ language එක ඉගෙන ගන්න සාම්ප්‍රදායික බුවාට ගැහුවේ
     

    Anonymous_Abstract

    Well-known member
  • Aug 7, 2018
    6,036
    4,566
    113
    Messier 87
    පයිතන් තමා බ්‍රදර්. අපි ඉන්නේ 2020 සේ. නැතුව බිෆො 2015 නෙවේ. මෙව්වා දැන් ML AI Data science deep learning wage දේවල් එක්ක දුවන්නේ . අනිත් එව්වා ඉගෙන ගෙන උබලා ෆාමසි මැනගෙමන්ට් සිස්ටම් ගහ ගහ ඉන්නද ජීවිතකාලෙම. අවුලක් නෑ ඒත් බන් උබලා දන්නේ උබලාගෙ ඩ්ගී එක ගන්න කොස් එකේ කරන ටික විතරනේ. එතනින් එහා මොනාද තියෙන්නේ කියලා බලන් නෑනේ. පව් ඕයි.


    Stact ගනින් ඔක්කොම දුවන්නේ පයිතන්. පයිතන් කියන්නේ කඩුවක් වගේ තමා ඕනි පැත්තකට කෙටුවෑකී.

    දැන් ඉතින් ලෙජන්ඩ්ලා ටික රෙද්ද උත්සන් එන්න එපා ඈ. ඔයාලත් ස්ටේබල් නේ පොඩ්ඩක් move වෙලා එහෙම අනිත් language ගැන එහෙම බලන්න පොඩ්ඩක් වත් කැමති නෑනේ.

    'අපිට ඉගැන්නුවෙ මොනාද .. ජාවා
    එහෙන්ම් අපී හැම දේම මැරෙන කම් කරන්න ඔනී මොකෙන්ද?.. ජාව වලින්'

    කොකත් ඉගෙන ගන්න එක වටිනවා. ඒ උනාට අපි ඉගෙන ගන්න ඕනි අපි දන්න ටිකෙන් වැඩ තොග පිටින් දාන්න පුලුවන් එකක්.

    නැත්තන් ෆාමසි සිස්ටම් හදලා වර්ටුසා වගේ එකක කබුරපන් ගිහින් ඒක සෝක්. කොමත් උබලා කැමති ස්ටෙබල් ලයිෆ් එකකටනේ.

    oba java igena gaththata update vela an. Spring boot is a king of microservice
     

    lakziro

    Well-known member
  • Mar 19, 2018
    390
    580
    93
    Metana weradi dewal tikak tiyanawa bro
    Kawadawat eka language ekak igena gena wedak naha eka piligannawa

    Java igena swing app hada hada hitiyoth uba kiyana pharmacy app hadanne
    habai java walin enterprise apps wenama hadanawa, specially backends
    godak Rest services dan nam microservices owa godak java walin liyanawa

    Danata tiyana products thawa awurudu 10k 15k giyath rewrite karanne naha eka nisa loweth Java C# demand eka tiyanawa

    Uba sirawata cloud platform athule weda karanawanam uba Go wage language igenaganna eka hodai, nattam rust :)
    habai python walin enterprise back ends mama danna taramin godak naha

    Python walin ML AI sira weda tikak karaganna puluwan, e wage wedak karana ekek Java OOP concepts igenaganna eka therumak naha
    E paththen yana ekekta, loweth python igenaganna eka hodai. habai always job market eka balana eka hodai ;)

    Math Go igenagatta eth lankawe Go kochchara sira unat jobs naha :P
    IInformative mc.
     

    Edward Kenway

    Well-known member
  • Jan 8, 2015
    12,350
    13,952
    113
    Metana weradi dewal tikak tiyanawa bro
    Kawadawat eka language ekak igena gena wedak naha eka piligannawa

    Java igena swing app hada hada hitiyoth uba kiyana pharmacy app hadanne
    habai java walin enterprise apps wenama hadanawa, specially backends
    godak Rest services dan nam microservices owa godak java walin liyanawa

    Danata tiyana products thawa awurudu 10k 15k giyath rewrite karanne naha eka nisa loweth Java C# demand eka tiyanawa

    Uba sirawata cloud platform athule weda karanawanam uba Go wage language igenaganna eka hodai, nattam rust :)
    habai python walin enterprise back ends mama danna taramin godak naha

    Python walin ML AI sira weda tikak karaganna puluwan, e wage wedak karana ekek Java OOP concepts igenaganna eka therumak naha
    E paththen yana ekekta, loweth python igenaganna eka hodai. habai always job market eka balana eka hodai ;)

    Math Go igenagatta eth lankawe Go kochchara sira unat jobs naha :P

    Java/PHP 90 ගණන් වල ඉඳන් "මැරෙනවා"

    අන්තිමට උනේ ඒවා මැරෙනකන් බලන් හිටපු උන් මැරිච්ච එක :rofl:

    Even PHP is moving fast now a days, 8 will come with JIT. Java is steadily asserting it's superiority in enterprise.
     

    Gedara_haraka

    Well-known member
  • Sep 15, 2017
    726
    310
    63
    Java>Python>PHP ( Based on my experience)

    ඉගෙනගන්න language එකක් ?
    ඒක ඔයා ඉගනගන්න පර්පස් එක අනුව වෙනස් වෙනවා,
    ගේම් ඩිවලොප් කරන්න ආසනම් C++, C# ඉගන ගන්න. (මේවගෙන් වෙන සොෆ්ට්වෙයා හදන්නත් පුළුවන්, c++ කියන්නේ සුපිරිම language එකක්).
    වෙබ් developing වගේ ඉගනගන්න ඕනේ නම් PHP කරන්න. (NodeJS ,ReactJS, Angular වගේ කරනවානම් ඉස්සරහට හොදයි).
    Android app පැත්තට ආසයිනම් Java ඉගනගන්න, (JAVA වලින් තව ගොඩක් දේවල් කරහැකි. ඒවගේම C++ වගේ language වලිනුත් app හදන්න පුළුවන්.) (Kotlin ,Flutter , React Native)

    AI , ML වගේ කරනවනම් අනිවා python ඉගනගන්න වෙනවා. (R එහමත් ඕනේ වෙනවා)
    *** Python වලින් උඩ තියන ඔක්කොම කරන්න පුළුවන්


    1. Java – used for nearly everything
    2. Python – used for nearly everything
    3. JavaScript – used primarily for web development (including Node.js)
    4. C# – used primarily for Windows applications (.NET); also for cross-platform apps and games (using Xamarin and Unity, respectively)
    5. C++ – used for nearly everything, esp. systems programming, games
    6. PHP – used exclusively for server-side web development
    7. C – used primarily for systems programming
    8. Ruby – used primarily for server-side web development with Rails framework
    9. R – used for statistical processing
    10. Perl – used for nearly everything
     

    kolavari

    Well-known member
  • Aug 11, 2012
    33,746
    1
    25,653
    113
    කැළෑ පොජ්ජේ
    Don't fight over languages...:lol: the people who fight over them are kids or probably the people who just "know" that language...:yes: they don't know anything beyond the "language".

    That's one way to differentiate between a software engineer and a coder..language is just a tool we use to solve a certain task.

    Coming back to your question, out of the three, java is the most difficult one to learn if you don't have any programming background.

    Java:
    Has a fixed oop style. (You need to oop well)
    Statically typed (which means you cannot just type in anything and expect it to work)
    Has a very cumbersome syntax..its a bit heavy and you need to pay a bit more attention to your coding (rather than logic)
    Lots of language features (which means it takes a long time to master)


    Java has a clear difference from the other two...its a static language, where as php and python are dynamic..(which means the code is more forgiving, yet it tends to be buggy)

    Imo, the second difficult language is PHP.

    It is dynamically typed
    Supports structural or oop paradigms
    Beginner friendly (easier if you come from a c background)
    Has a huge standard library (lots of features out of the box, so you have lot to learn)
    Very incosistent (a beginner may not catch this, but it has incosistent naming etc). This doesn't make it difficult to learn though.
    Used for web mostly..has lots of oop features..latest versions like 7 and up coming 8 are going well.
    Better stick to some programming guide lines like psr and you will be good.
    Has lots of frameworks (good ones indeed, like laravel)

    Python:
    Has a simple syntax, and very easy to learn.
    It encourages simplicity
    Supports structural and oop (a bit weird oop syntax, personally i don't like it). But it doesn't matter for a beginner.
    Has lots of features out of the box.
    Many similat methods exist in the standard library to the same thing..for ex.for iterables. They do have different purposes, but look alike...so a beginner may get confused. (You won't be worried about them as a beginner)
    Can be used for web and general purpose scripring
    Doesn't support web like php does. But has beautiful frameworks like django.
    Has coding guidelines like PEP, try to adhere to them from the beginning..
    ...oh...and don't forget to read the zen of python ;)

    Final thoughts..
    Php and python both are good choices for a beginner. If you start with php, you will find it a lot easier to move to other languages because it inherits certain features from C..including the syntax. Both are dynamic, which means you won't be forced to declare variables, or worried about their type..this ia good for beginners (but they lead to buggy codes, hard to maintain)

    Php 7 has strict typing...but as a beginner you shouldn't worry about that. Get the basics and learn the stuff..

    Python can be learned in a week. But its not easy to master. And its an art of its own :) unlike coding in php, python makes you feel different (but trust me, it makes it difficult to learn languages like javascript)..

    All of the above are my personal experiences and my personal views.

    I have used php since 2008 :) that's about 12 years now.

    I have used python since 2014, thats about six years :)

    So i have spent quite a long time with both the languages and seen their faults and beauties...php and python are both good languages..and have a good market..but python is used in machine learning related stuff because lots of libraries are written with python, and its good at crunching the numbers. So if you have plans to move to data science, python is a good start. But if you plan to become a real programmer, focus on writing elegent logics..

    Once you reach that level, you will stop fighting over languages like kids :lol: learn more than one language..good luck..ask me if you have any questions.
     
    Last edited:

    හෙළයෙක්

    Well-known member
  • Apr 26, 2014
    48,460
    98,390
    113
    ගොඩක් ඩිවලොපර්ස්ල ලැන්වේජ් එකක් ඉගෙන ගෙන ඒක හැම එකටම දානව. කරන්න ඕනි එකක් ඉගෙන ගෙන් ඊට පස්සෙ අනික් ලැන්වේජ්ස් අවශ්්‍තාවෙ හැටියට පාවිච්චි කරන එක. එක ලැන්වේජ් එකක් හරියට ඉගෙන ගත්ත නන් අනික් ඕනිම ලැන්වේජ් එකක ලර්නින් කව් එක පැය 6කට අඩුයි. අමාරු ලේසි ලැන්වේජ් නෑ ඒව ඒ ඒ ටාස්ක් වල හැටියට තමා අමාරු ලේසි වෙන්නෙ.

    පොරවෙන් පාන් කපන එකයි පෑන පිහියෙන් ගස් කපන එකයි දෙකම අමාරු වැඩ. ටූල් දෙක මාරු කරා නන් ලේසි වැඩ.

    ජාව වලින් කරන සමහර වැඩ පයිතන් වලින් කරාම ප්‍රොජෙක්ට් ගන්න දෙයක් නෑ. පයිතන් වලින් කරන්න ඕනි වැඩ ජාව වලින් කරනව කියන්නෙම වෙලාව නාස්තියක්.

    අලුත්ම ට්‍රෙන්ඩ් වෙන ලැන්වේජ් නන් ඉගෙන ගන්න ආස GO Lang හරි Rust හරි බලන්න. පයිතන් වලට දැන් තියෙන තැන ටික ටික ඔය දෙකෙන් එකක් ගනී.
     
    Last edited: