• 0

Which language would you chose between C# and PHP


Question

I'm interested in changing career paths from computer repair and troubleshooting to programming. The two languages I'm looking at are C# and PHP. I understand the two are apples and oranges in comparison because they are for two entirely different things. However, I would like to learn a language that is in high demand and could give me a good level of job security. So based on your knowledge and experience, which of these two would you think could provide that? I appreciate any feed back you can provide.

Thanks! :D

Recommended Posts

  • 0

C# is more general-purpose, it's used on a wide variety of platforms (pretty much all) to do a wide variety of things, be it games, mobile apps, traditional GUI-based applications, web servers, etc. Syntax-wise, C# has a deep Java and C++ heritage; it's also only one of a family of diverse languages running on the .NET platform, including VB, F#, IronPython, IronRuby and many more. It's also a well-designed language and a pleasure to work with in general.

I haven't learned PHP, but from what I heard, I perceive it as hackish and quirky, and it's certainly much more limited in its application domain, that is, server-side code. I even wonder if it's not going to be entirely replaced by Javascript now that Javascript is used on the server as well, but that's pure theorizing on my part.

Both are in high demand but, again, it's a question of application domain. IMO C# opens many more doors than PHP.

  • 0

Definitely C#. You can do so much more with it. You can use it with ASP.NET for server-side stuff that you would use PHP for. Then there is the added benefit of everywhere else you can use C# - desktop apps, mobile apps...

I haven't learned PHP, but from what I heard, I perceive it as hackish and quirky

That's certainly how I would describe it.

  • 0

I haven't learned PHP, but from what I heard, I perceive it as hackish and quirky

I think this article, albeit long, sums up PHP pretty nicely.

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

  • 0

C/C#/C++/PHP/etc. all have relatively similar syntax, the main issues come down to the bindings or APIs provided. If you're looking at web programming look into things like Ruby or Python, for desktop programming C# would be fine.

I think this article, albeit long, sums up PHP pretty nicely.

http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

That amazed me, I knew PHP was pretty meh, but I didn't realise it was that bad.

  • 0

As someone who has used both C# and PHP, I can't express enough how much better C# is. PHP is certainly a capable language, but you do notice quite quickly some very quirky design decisions. If you have the option, pick C#.

In terms of valuability as a career choice, there's not much in it in my experience. Web developers will tend to favour PHP (or Ruby or Python) since historically its cheaper to run as it didn't require a Windows Server, it was also one of the first languages tailored to web development.

On the other hand, business programming and desktop development is usually oriented around .net languages. C# being the favourite. As a C# developer, I'm regularly being approached with offers of C# developer jobs, so you'll certainly carry value knowing C#.

TL;DR pick C#

  • 0

Between the two choices, C# easily. Not just because it's a better language, but you can use the same language and tools for near everything.. web, desktop, mobile, gaming, etc, plus it's available for multiple operating systems. (Granted, as long as you can work with the deficiencies of Mono.)

I think this article, albeit long, sums up PHP pretty nicely.

http://me.veekun.com...-of-bad-design/

Good reading, really points out some of the absurd design choices in the language.

  • 0

C#. There are a lot of jobs out there on the .NET stack from mobile apps, back end web services, asp.net web sites to desktop apps and so on. It's a far more widely used language, whereas PHP pigeonholes you into web stuff.

Its also pretty easy to go to Java which is equally in demand, or to C++. PHP is starting to go out of fashion a bit. If programming languages ever were in fashion, anyway.

  • 0

I think this article, albeit long, sums up PHP pretty nicely.

http://me.veekun.com...-of-bad-design/

Oh my God. That seems worse than C++ somehow. I think I'm going to keep not learning PHP for a while. :laugh:

[Just for the record, there's a similar, even longer rant about C++ on the internet: http://yosefk.com/c++fqa/ ]

  • 0

Oh my God. That seems worse than C++ somehow. I think I'm going to keep not learning PHP for a while. :laugh:

That article summed up my experience with PHP nicely. I hate it, but I have to live with it (albeit only occasionally, thank the maker). Unless you specifically have to, don't learn PHP. It's an ugly language that tries to look like C (and now C++ since it's adding stuff like classes and, one day, namespaces), but never quite works how you'd expect it to. The level of inconsistency is pretty staggering too, which is only multiplying now that classes are being added into the mix. Besides, if you have to, it's pretty easy to pick up if you know C/C++, as it's a C-based syntax (with extra dollar signs). If you're looking to do web development, ASP.NET, Ruby, Python, are always there, and you can't really miss with any of them, they're all far superior to PHP.

  • 0

However, I would like to learn a language that is in high demand and could give me a good level of job security.

If this is what matters to you the most, then you should also consider Java. I'm not crazy about the language, but it wins hands down in the job market.

Still, out of the two you provided, I'd go with C# - but the languages are not only different in such silly terms as syntax - they serve different purposes.

With PHP you'll end up writing web-oriented systems, whereas C# is kind of a juggernaut for anything that you can run on Windows (in some cases, also Linux and Mac OS, but I've never used MonoDevelop myself, so take it with a grain of salt).

Then again, C# and Java are fairly similar (as far as the basic concepts go, of course), except that the other one is not platform-specific.

  • 0

IMO C# opens many more doors than PHP.

I disagree. Because PHP runs on any platform, it's much more flexible. It's the old proprietary vs FOSS argument again. Personally, I'd go with the FOSS tool every time. It's free, fully supported across all platforms, and it powers a great deal of the web.

I suppose it comes down to whether you're doing web development or general development. If it's more general you're after, I'd go for something like Java, Python, C, C++, Javascript. All very much in demand.

  • 0

Microsoft implementations run on Microsoft devices, and Mono runs everywhere else. So, C# runs, and is widely used, everywhere: in the mobile space, on the server, on the desktop client, on console. I don't think the same can be said of PHP.

  • 0

Microsoft implementations run on Microsoft devices, and Mono runs everywhere else.

Exactly. So it's not Microsoft's C#. It's another implementation that's poorly supported and does not have the same capabilities. I wouldn't recommend that to anyone. If you're only developing on Microsoft platforms, fair enough, but elsewhere, you're going to run into problems.

So, C# runs, and is widely used, everywhere: in the mobile space, on the server, on the desktop client, on console. I don't think the same can be said of PHP.

1. Mono isn't free on mobile. In fact it's quite costly.

2. Mono in general isn't as feature complete as Microsoft's implementation.

3. Mono's future is uncertain. SuSE fired most of their mono development team, and the new company formed to continue it is heavily involved in trying to monetise it. I wouldn't bet on Mono surviving for much longer.

4. Microsoft could choose to assert its patents against other implementations (like Mono) if it so wished in the future.

With so many problems concerning dotnet and C#'s crossplatform support, I would never recommend it.

Richard Stallman said it best

Debian's decision to include Mono in its principal way of installing GNOME, for the sake of Tomboy which is an application written in C#, leads the community in a risky direction. It is dangerous to depend on C#, so we need to discourage its use.

The problem is not unique to Mono; any free implementation of C# would raise the same issue. The danger is that Microsoft is probably planning to force all free C# implementations underground some day using software patents. (See http://swpat.org and http://progfree.org.) This is a serious danger, and only fools would ignore it until the day it actually happens. We need to take precautions now to protect ourselves from this future danger.

This is not to say that implementing C# is a bad thing. Free C# implementations permit users to run their C# programs on free platforms, which is good. (The GNU Project has an implementation of C# also, called Portable.NET.) Ideally we want to provide free implementations for all languages that programmers have used.

The problem is not in the C# implementations, but rather in Tomboy and other applications written in C#. If we lose the use of C#, we will lose them too. That doesn't make them unethical, but it means that writing them and using them is taking a gratuitous risk.

We should systematically arrange to depend on the free C# implementations as little as possible. In other words, we should discourage people from writing programs in C#. Therefore, we should not include C# implementations in the default installation of GNU/Linux distributions or in their principal ways of installing GNOME, and we should distribute and recommend non-C# applications rather than comparable C# applications whenever possible.

  • 0

Exactly. So it's not Microsoft's C#. It's another implementation that's poorly supported and does not have the same capabilities. I wouldn't recommend that to anyone. If you're only developing on Microsoft platforms, fair enough, but elsewhere, you're going to run into problems.

1. Mono isn't free on mobile. In fact it's quite costly.

2. Mono in general isn't as feature complete as Microsoft's implementation.

3. Mono's future is uncertain. SuSE fired most of their mono development team, and the new company formed to continue it is heavily involved in trying to monetise it. I wouldn't bet on Mono surviving for much longer.

4. Microsoft could choose to assert its patents against other implementations (like Mono) if it so wished in the future.

Myths and fear-mongering.

1) Mono sees frequent updates and development has not slowed or showed signs of immobility. New features in .NET are quickly implemented in Mono, often released before Microsoft.

2) Mono does not support certain Windows-specific .NET libraries such as WPF, because they are Windows-specific (so no one cares). Otherwise, the feature set is essentially the same. Mono also offers capabilities not present in Microsoft's .NET, such as SIMD support.

3) That MonoDroid and MonoTouch cost money doesn't make them any less available and supported. Besides, most people making a living of writing software are ready to invest 400$ in their tools.

4) People have been predicting the ruin of Mono since its inception. In reality, Mono has been a successful business venue for more than a decade now. MonoDroid and MonoTouch are popular tools that sell well and make a lot of money. Most of Mono is covered by ECMA standards, most of the remainder is under Microsoft Community Promise, and the little that isn't could be worked around, and there are little grounds to suspect concrete hostility by Microsoft. For all the fear-mongering, there hasn't been a single patent claim by Microsoft in Mono's 10 years of existence. Your Richard Stallman quote was answered by Ubuntu and Fedora thus:

"It is common practice in the software industry to register patents as protection against litigation, rather than as an intent to litigate. Thus mere existence of a patent, without a claim of infringement, is not sufficient reason to warrant exclusion from the Ubuntu Project."
"We haven't come to a legal conclusion that is pat enough for us to make the decision to take mono out."
[source]
  • 0

PHP is a good language ! (obviously people talking negative about it have not used it or find it hard to even begin to understand the power php and use has) but it is server side so you would be looking more at web development.. rather then C# I would look at java as it is the language of tomorrow its growing so much and is multi platform

  • 0

I think this article, albeit long, sums up PHP pretty nicely.

http://me.veekun.com...-of-bad-design/

the person who wrote that "article" has about as much credibility as a cats anus. PHP is a good web development language I know more then just PHP (which that BS article suggests) I Have been using PHP since I was 15 and now at university getting top grades in computer programming and web programming aswell as owning a web development company along with being a developing professional so Please next time you post something which insults my line of work please understand just because you dont like it and cant comprehend it does not mean others are the same way.

  • 0

the person who wrote that "article" has about as much credibility as a cats anus. PHP is a good web development language I know more then just PHP (which that BS article suggests) I Have been using PHP since I was 15 and now at university getting top grades in computer programming and web programming aswell as owning a web development company along with being a developing professional so Please next time you post something which insults my line of work please understand just because you dont like it and cant comprehend it does not mean others are the same way.

You took that way too personally. If you disagree, that's fine. But I won't stop posting things like this just because it might offend you (or others). Next time, might I suggest pointing out what's wrong with the article rather than going on a rant? You don't have to debunk the entire article, just pointing out a few false facts or inaccuracies will do plenty to diminish the credibility of the article and help others to think differently about it.

  • 0

You took that way too personally. If you disagree, that's fine. But I won't stop posting things like this just because it might offend you (or others). Next time, might I suggest pointing out what's wrong with the article rather than going on a rant? You don't have to debunk the entire article, just pointing out a few false facts or inaccuracies will do plenty to diminish the credibility of the article and help others to think differently about it.

it wasnt so much the article and you posting it more you agreeing with everything but yes you are right I am sorry. I pointed out the key insulting thing where the article basically says anyone who learns and goes forward with PHP does not know anything else...

he also says that PHP does not have advanced error checking, this is false there is a way to get it but its add on to your libary.. while there is still alot of php I do not know with the amount I do know I can do almost anything the language is capable of doing...

is it bad there is 100 ways to do one thing in php? and 100 ways to write the same code with the same end result? no it allows a more people with different mind sets and thought patterns to use the code rather then there be one way only to do something..

he also complains about settings if this and that is turned off it wont work... he needs a clap and a half thats the point of being able to turn it off!

this guy obviously knows about PHP but does not understand it at all he read the documentation it made him rage and he hates any body smarter then him (so anyone who can do php) I dont care if someone hates PHP loads of people i learn and get taught by hate it but his article is not a side of a story and opinion he fills it with false facts or tries to make true things sound like they are one sided..

  • 0

this guy obviously knows about PHP but does not understand it at all he read the documentation it made him rage and

The article is very long and quite extensive. I don't see how you can write it off so easily.

he hates any body smarter then him

Given that the author seems to know a lot about the subject, and you're just flying off the handle for absolutely no reason...

PHP isn't perfect, although it sounds like this is news to you. Take a look at Django (Python) or ASP.NET (C#) to see why PHP is so awful. I love me some Django.

  • 0

The article is very long and quite extensive. I don't see how you can write it off so easily.

Given that the author seems to know a lot about the subject, and you're just flying off the handle for absolutely no reason...

PHP isn't perfect, although it sounds like this is news to you. Take a look at Django (Python) or ASP.NET (C#) to see why PHP is so awful. I love me some Django.

I read the whole thing.. and I know it is not the best and needs some updating I know what I am talking about I may not be grande master PHP wizard but I clearly know alot more about the benefits then him ... and just because he can read documentation does not mean he knows what he is talking about he used some code which is viable code and some which is just a different way of writing one thing ... and I am happy with my php and java thanks (not that I have not looked at them I have looked at every one but preferred these) you are entitled to your opinion about php and if you think its crap then cool but that guy who wrote the article knows nothing and he then gave loads of arguments which he tried to justify why PHP is not needed or is used and It was just a load of hog

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • My father still uses a programme written in dbase3. Still manages to work with a little help from dosbox. 
    • Microsoft hides these secret Windows 11 performance boost settings available on every PC by Sayan Sen Windows enthusiasts often look for ways to extract as much performance out of their systems as possible, and it's often the case that they try and do so while trying to minimize the heat and power consumption. This is especially relevant in the case of mobile Windows PCs since laptops and notebooks tend to get hot and management of that heat and power is harder in such a form factor. As such users often turn to techniques like under-volting which can be used to squeeze out the maximum capabilities of a chip while also maintaining lowered power levels. There are official apps from AMD and Intel with the likes of Ryzen Master and XTU (Extreme Tuning Utility). While these are quite handy, most enthusiasts probably prefer to dig into the BIOS and play around with settings there like Curve Optimizer on Ryzen, which lets users set various frequency-voltage scaling values. These are essentially called P-States. If you are not familiar with them, Processor Power Management is done through Advanced Configuration and Power Interface (ACPI) P-states and C-states. While P-states or performance pwoer states handle CPU voltage-frequency scaling, C-states deal with CPU sleep states so that some of the CPU functions, which are not necessary at that moment, can be disabled. The P-states and C-states work together to make the processor run more efficiently. It helps the OS and apps determine which cores can be parked and which should be boosted. Of course not every user is an enthusiast or knows the technicalities and integrities of how things like overclocking or undervolting work. Thankfully for them Windows itself offers something pretty cool, though it is hidden by default on all systems. By default, Windows only has two P-States, "Minimum Processor State" and "Maximum Processor State." However, this can be changed with a Registry trick to expand the options under a secret "Processor performance boost mode" dropdown. This essentially enables the HWP or hardware P-States available on a device, and these are not controlled just by the OS itself as the underlying hardware gets involved too. In total there are five Processor Performance Boost Mode profiles that control how Windows requests and allows CPU turbo/boost behavior under the different power policies. They are: Disabled: In this mode, processor boosting is effectively turned off. The CPU will avoid entering turbo or boost frequencies and instead operate closer to its base frequency ceiling. This can significantly reduce power consumption and heat output, but at the cost of reduced burst performance and responsiveness in short workloads. Enabled: This is the standard behavior where boost functionality is allowed under normal conditions. The processor can opportunistically increase frequency when workload demands it, balancing performance gains with power and thermal constraints as managed by the system. Aggressive: Aggressive mode favors performance more heavily, allowing the CPU to enter higher boost states more readily and sustain them longer. This should in theory improve responsiveness under bursty or heavy workloads but increases power draw and thermal output compared to the default enabled behavior. Efficient Enabled: This mode still allows boosting, but with a stronger bias toward energy efficiency. The system attempts to use boost more selectively, avoiding unnecessary frequency spikes when the performance gain is marginal. Efficient Aggressive: This is a hybrid approach where boost is still performance-responsive, but the system continuously weighs efficiency more heavily than in Aggressive mode. It aims to deliver noticeable performance improvements while reducing wasted power in less demanding scenarios. Here's how to enable the Processor performance boost mode: Open Registry Editor: Press Win+R, type regedit, and click OK. Go to: HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\be337238-0d82-4146-a960-4f3749d470c7 (where HKLM stands for HKEY_LOCAL_MACHINE_) Modify the value of Attributes from 1 to 2 (you can find modify option by right-clicking) After that, exit Registry, you should now be able to see the new "Processor performance boost mode" dropdown menu: As you can see there are now five new P-States or CPPC states or power profile available that help define the boost mode processor setting on your PC. Wrapping it up here's a quick run-down of the settings as defined by Microsoft itself. Setting Description Disabled The corresponding P-state-based behaviour is disabled. Collaborative Processor Performance Control (CPPC) behaviour is disabled. Enabled The corresponding P-state-based behaviour is enabled. CPPC behaviour is Efficient Enabled. Aggressive The corresponding P-state-based behaviour is enabled. CPPC behaviour is Aggressive. Efficient Enabled The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Efficient Enabled. Efficient Aggressive The corresponding P-state-based behaviour is Efficient. CPPC behaviour is Aggressive. Aggressive At Guaranteed Windows calculates the desired extra performance above the guaranteed performance level, and asks the processor to deliver that specific performance level. Efficient Aggressive At Guaranteed Windows always asks the processor to deliver the highest possible performance above the guaranteed performance level. In the next part we shall be comparing these settings to explore how much of a benefit or regression they can provide in terms of performance and power efficiency. If you decide to change the values on your system and are experiencing problems like crashes or an overheating PC, make sure to revert the steps back to the original state.
    • I think he means you haven't reviewed previous UFC games. Of course it doesn't matter... Every time you just report on something that involves the President even if just simply what happened you guys usually get accused of being anti-Trump. We live in fun times.
    • So how did you solve the problem? Disabling Secure Boot isn’t a solution.
  • Recent Achievements

    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
    • Week One Done
      agatameier earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      93
    5. 5
      Steven P.
      77
  • Tell a friend

    Love Neowin? Tell a friend!