Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

naczu's avatar
Level 1

Where to go ? Laravel or .NET core 2

Actually I am interested with php development for many years. And I like laravel and it's syntax. I am not expert but I can handle small projects with php and laravel. But Now it's time to go with large scale projects and time to be integrated with developer teams. Lots of companies looking for .net core developer. And it is really performant. I saw this on microsoft's page https://www.techempower.com/benchmarks/#hw=ph&test=plaintext.

I know the reason of this benchmark result is not laravel. it is PHP.

Will PHP and laravel be dead for web development in the future ?

PHP is only for backend server side scripting. There are some GUI implements but they are not supported I think. Java or C# can be used for many things such as desktop apps, mobile apps. PHP has many packages and libraries for web. This is absolutely very nice advantage for PHP developers. Facebook, Yahoo, Wordpress used PHP. There is a small piece of PHP on backend of facebook. There are many articles that written now its time to go with C# and .net core. Because it is open source and supports cross platform. C# is strong typed language and Async.

What are PHP and Laravel advantages over C# and .net core ?

0 likes
41 replies
neilherbertuk's avatar

My last reply was the short answer, this is the long.

Lots of companies prefer .net and Microsoft technologies because they have to pay for it through server licensing and IDEs. It gives a lot of companies a sense of security, because they pay money for something it must be enterprise ready and supportable.

The technology that's used makes no difference, PHP and .net are just as capable as each other. It's like trying to compare Burger King and McDonald's, it's just a matter of opinion and impossible to conclusively come up with a way to say which is better.

You have however, asked a PHP community this question. I don't think there would be a single person here who would say that PHP will be disappearing anytime soon. The company I work for have have a mix of .net and PHP/Laravel applications and we are seeing more things starting to get developed with Laravel than .net due to the cost implications.

Helmchen's avatar

i'll stick with PHP as long as i can .. i'am pretty happy with the performance, especially since PHP 7 got released - if you have no or little experience then even C++ is worse then PHP, we can see this in Game Development every day between C# and C++ .. performance means optimized and high quality code, not the "fastest" language

The speed with which you can develop also plays a major role, for me even the largest

1 like
ttjordan's avatar

Like, "The speed with which you can develop also plays a major role, for me even the largest"

I see this on my current team. Some simple develop/code faster than others. It's interesting those who know PHP are the faster developers. Keeping in the mindset of just getting stuff done.

naczu's avatar
Level 1

Thanks for comments @Helmchen @neilherbertuk . PHP is only for backend server side scripting. There are some GUI implements but they are not supported I think. Java or C# can be used for many things such as desktop apps, mobile apps. PHP has many packages and libraries for web. This is absolutely very nice advantage for PHP developers. Facebook, Yahoo, Wordpress used PHP. I heard that now wordpress will change it's tech. They think to use javascript for backend. There is a small piece of PHP on backend of facebook. There are many articles that written now its time to go with C# and .net core. Because it is open source and supports cross platform. C# is very strong language and Async. What are PHP and Laravel advantages over C# and .net core ?

LiamHammett's avatar

PHP is only used for backend server side scripting you're right, but the same can be said for every other language you use for a WEB app - whether you use .Net or C++ or Python NodeJS or Rails. That's just how the web is designed to work, you use HTML/CSS/JS on the front-end, PHP is not unique in this respect.

FaceBook has huge amounts of PHP in their code base, they maintain their own fork and they have a ton of it on their GitHub page. That said, FaceBook is not a typical example that you should use as a basis for your own application, they deal with billions of users and only the likes of Google has to worry about the same kind of problems FaceBook does.

WordPress is not dropping PHP for their backend, they are however using React.js for their administration section for the front-end to give a more flexible experience.

I'm not sure where you're getting your information from, but it's skewed from reality.

As has already been said, a competent developer can use ANY of these languages/frameworks just as well as another, the number one thing to be concerned about is whether you're familiar with its practices and are happy using it.

One thing Laravel does extremely well is focus on getting things up-and-running extremely quickly and keeping a low cognitive complexity when reading your own code, which helps a lot when you're dealing with any sized code base. It also has an immensely huge community and is the most popular backend framework on GitHub, so it has a ton of support in terms of packages, articles, tutorials and other help where you may need it. You need to research how it works and whether you're comfortable with that.

PHP isn't going anywhere any time soon, just like C# or .Net or NodeJS or anything else mentioned isn't going anywhere soon. It's your decision what to use.

2 likes
SapporoGuy's avatar

Difficult choice.

PHP has gotten much better and with laravel/symfony, more real world options in enterprise are starting to happen.

Support for php in an enterprise that has little experience will face trouble. It is doable but much of the IT support will just look at you and wonder what is going on.

Also, salary is a factor. Is your area mostly Enterprise or smaller shops which tend towards PHP?

Finding jobs with just laravel can be a problem too.

jlrdw's avatar

A good sized medium application then php is fine, any larger not so much.

Ask yourself this, or research what does the following companies use:

  • CH Robinson (Probably largest logistics co there is)
  • JB Hunt (HUGE)
  • Fedex
  • UPS
  • Landstar Transportation
  • Sams Walmart logistics
  • Social Security Adminstration
  • Etc

CH Robinson does more data in a week than probably all on this forum combined does in a year. Or at least close.

No answer needed.

But for most general medium to small applications, I will go with PHP every time.

Huge application I would go with java technology EJB's, servlet, jsp.

The State of Texas was java technology.

But large enterprise leverage all technologies, meaning the heavy logistics is java or asp.net, or even c++. But they also use php for some smaller aspects.

I can tell you that Texas has the heavy hitting application for employees, and not jazzed up with css, etc. But the portion for the public is prettied up for looks.

Edit: In asp.net I liked that razor language. But didn't use much. I mostly used Java. Came to php several years ago, no longer do Java. Semi retired now. So it's smaller php apps for me.

And laravel hasn't much to do with it, dig into those vendor files, basic php in background. But Taylor put a lot of work in laravel to make many things easier.

I mainly like laravel the best because it is very flexible.

Helmchen's avatar

PHP and Java have also developed in the same direction for a long time. You did not even know who was looking for something from whom.

If you compare the syntax, that's scary.

However, I could never make friends with it, but I have to say that our use cases refer to the web 99.9%.

Java WebApplets are just too complicated for simple applications, my opinion.

The same goes for .NET for me. I just do not have the necessary experience with it.

And if it is similar for the thread creator, the answer is actually already obvious, at least if you want to make money at short notice.

jcmargentina's avatar

totally disagree.

honestly, I have worked with .Net ... Java for web ... and they suck!

.Net is expensive ... complex, syntax killing, the performance is a shame.

Java, ... well .. java, the syntax sucks, is a computer-resources serial killer

today , behalf of PHP you have NodeJS .. you have GoLang (incredible) ... stick with them.

even though Java developers are well paid ... honestly ... sucks! the market is the market ... the market is ruled mostly buy the companies that is made of.

jlrdw's avatar

@Helmchen Java technology is vast, you are right. You could spend 10 years learning and just scratch the surface. So many branches of it. I used Java classes, servlets, jsp at a mid sized trucking co. But I was still like a first grader compared to the folks who program for Fedex, UPS, etc.

But for large enterprise, java is a very stable with long backwards compatibility (like 10 years). CH Robinson has millions of dollars in there software. Can you imagine using laravel and have to change stuff every 6 months. Even php backwards compatibility is pretty good, but not as long as java's is.

But php has come a long way over the last 10 to 12 years.

Cronix's avatar

But php has come a long way over the last 10 to 12 years.

Its come a long way in just the last 2 years since php 7 was released lol! Massive speed and optimization improvements since 5.6

Helmchen's avatar

@jlrdw You are right :) I was more interested in showing that it's more important to focus on the languages you really master when it comes to earning money in the short term.

For someone who just decides to start programming, that's a totally different story. He can then choose the language that best suits his job, not the other way around :)

If you have enough time to acquire .NET (or Java), good enough for commercial products, then sure, go for it.

I bet none of this will disappear in the next 10 to 20 years.

jlrdw's avatar

I am an oldie, my very first programming was dbase 3. Years before there was Windows. The MS DOS prompt and the dbase dot prompt. First computer you booted from a large floppy operating system loaded in memory then you replaced it with another floppy for usage.

jcmargentina's avatar

talking about enterprise products. ...Facebook is mainly created with php.

Booking.com .... with .... (OMG ) with PERL mainly.

Java and .Net are marketing products. I would never .... ever suggest someone to use them.

Helmchen's avatar

if performance really is crucial you probably also tend towards desktop applications - or special application servers that communicate with mobile applications or the web. Of course, PHP can not keep up with that, but it does not have to. A good example would be Apache SOLR. It's written in Java, but PHP can query and get results through a REST API.

With message queues or corresponding API interfaces there is actually no reason why you can not have both.

benjivm's avatar

While it's true that Facebook was built on PHP from the beginning, the landscape has changed quite a bit since then, read Josh Duck's answer here: https://www.quora.com/Why-hasn-t-Facebook-migrated-away-from-PHP

That answer was in 2016, Hack is surely even more alien from modern PHP now in 2018.

There's a lot of confusion about Microsoft's current web ecosystem, and that's definitely Microsoft's fault: their naming conventions are hysterically awful. Nobody should be learning ASP.NET MVC or any of the .NET 4+ targeting web frameworks unless you have to for work or something.

Microsoft's new web direction is in .NET Core, and .NET Core is totally radical: type safety, async/await, Entity Framework, open source, cross-platform, built on a very mature code-base with a sophisticated and powerful language in C# (though you can use others, VB, F#, etc., but I much prefer C#), and highly performant.

@jcmargentina said .NET performance is "a shame", which proves he has never worked on a .NET application: there is a reason the entire StackOverflow technology stack is built on .NET: it is insanely fast and scales beautifully.

I love Laravel and enjoy managing and developing the Laravel applications I use at work daily, but the more I get into .NET Core the more I like it and plan on porting portions of our applications to it in the future.

But yeah, hating on Microsoft is hip.

2 likes
jcmargentina's avatar

@benm .... ,

I used to code with microsoft tools since VB6 ... and in .Net since the release of version 2 of the .Net Core, but I decided to complicate my life and stop using Microsoft tech.

.... Maybe the best choice I made

pdcmoreira's avatar

We've been working with .NET Core for over an year now and it's just so much better in terms of performance and reliability that I can't see any reason at all to go back to an interpreted language. It doesn't have all the cool libraries that Laravel has, but there are lots of good ones and we have all the amazing features of C#. Also it's insanely fast, even if we throw lots of inefficient code at it. We're talking 10 times faster locally with debugging than Laravel in a monster-specced production server. And I've heard that it's even faster on a Linux/nginx setup.

amirvenus's avatar

@neilherbertuk

"Lots of companies prefer .net and Microsoft technologies because they have to pay for it through server licensing and IDEs. It gives a lot of companies a sense of security, because they pay money for something it must be enterprise ready and supportable."

I completely disagree with your opinion.

First of all, I have to say that Microsoft is moving towards making things free, cross-platform and open-source such as ASP.net, SQL Server and Visual Studio just to name a few.

ASP.net Core blows PHP out of the water (let alone Laravel) in terms of performance.

PHP is a language of past and even the big players who used it realised they need something more powerful that's why they came up with HHVM or KPHP.

PHP suffers from the fact that it lacks a decent IDE (although one could argue that Netbeans can be used as well)

LINQ and Task Parallel Library alone are good enough reasons for me to continue coding in .NET and not ever be bothered about PHP.

1 like
amirvenus's avatar

@benm

Even if PHPStorms wins the battle against VS, PHP cannot still be compared to C# considering features such as async/await, Generics, Linq, etc.

benjivm's avatar

Obviously I'm not going to argue with you there, if you read my previous posts in this thread you'll find that I've already literally said that exact thing.

I was addressing your assertion that "PHP suffers from the fact that it lacks a decent IDE", which is just not true--PhpStorm is better than any IDE in the .NET land that I've used--Rider is nice, but unfortunately its code completion and debugging tools are pretty limited at the moment.

1 like
smack27's avatar

A good sized medium application then php is fine, any larger not so much.

Ask yourself this, or research what does the following companies like walmart (https://walmartone.onl) use

CH Robinson (Probably largest logistics co there is)
JB Hunt (HUGE)
Fedex
UPS
Landstar Transportation
Sams Walmart logistics
Social Security Adminstration
Etc

What do they actually use?

slcastroj's avatar

Hi, I'm a C# developer currently working on a Laravel project, so I hope I can give some insight on .NET Core.

.NET Core is:

  • Not .NET Framework nor Mono, it's a brand "new" runtime (initial release was on 2016)
  • Cross platform (Windows, Linux, Mac and recently, ARM)
  • Strongly typed (C# and F#)
  • Open Source, you got WinForms, WPF (windows only), ASP and EF Core, ML.NET, the runtimes, compilers, analyzers, etc. All that, and more, is currently open source.
  • Extensively supported
  • FREE!!! (.NET Framework and Mono are and have always been free tho, but the people like to hear this for some reason)

Laravel vs .NET Core, both support and use:

  • Service and middleware oriented arquitecture
  • MVC with view and controller scaffolding (Blade and Razor respectively)
  • ORM with model scaffolding and query builder (Eloquent and EF Core)

Some big features of .NET Core are:

  • Strong typing (I specially like this one, but that's me haha)
  • Blazingly fast SPAs with the recent addition of Blazor (modular, dynamic Razor over WebAssembly)
  • Dependency injection through services
  • Easy to mock and test
  • Faster than Laravel and Django*

* In most cases, according to this benchmark page

2 likes
naczu's avatar
Level 1

in the end, I understood this comparision is really silly. .net core and C# is for professionals. Laravel not. because php is weakly typed language . I faced many troubles because of this weak typed language php. .net and C# make developer focused on type safety, architecturing design patterns etc. The question was "Where to go" The answer is C# and .net core

1 like
kitesurf's avatar

and don't forget the finicky "homestead" that just plain sucks. wasted sooooo much time on Homestead. I began learning C# a year ago. I fired up Visual Studio (free) and the app I created just works right out of the box! no need for the complex Homestead. honestly, the Homestead is the MAJOR hurdle to Laravel. Laravel is good for sure. in fact great. but Homestead is not. maybe it's changed since Laravel 8?

1 like
cjedgerton's avatar

I'd like to carry on this conversation as I'm wondering if anyone has gone from Laravel into .net core Razor Pages/MVC and what their experience has been.

Not to hijack the thread, but as a solo developer in my company and after 5+ years of use, at this point I feel like I can wield Laravel like an extension of my own ~~body~~ brain. The flexibility works for all of the varying situations that I come across. With Laravel I don't have to think about the framework or language, only creating a business solution. Many of the features built into Laravel seem to require extra NuGet packages in .NET core, and Microsoft's docs leave much to be desired.

Has anyone gone cold turkey from Laravel to .net core and reached, or see that level of comfort in sight?

tianwen's avatar

I started my career from .NET Framework 3.5 then went to laravel. lately back to dotnet core. I feel dotnet core environment is much more comfortable to work with. Strong Typed language make you more confident about your code. I also adapt to use microservices. The benefit which PHP cannot give is you can put all your API input/output to Class Library, let's call it Dtos project. Then you can build a SDK to serialize the Input/Output of your API from/to Dtos classes. Then put your SDK and Dtos class library to nuget package and let other team to use. In Class Library, you can also put Comment and compile it, Then in visual studio, the comment become documentation. In PHP, although you can build a SDK, but the Dtos classes hardly can share between your Applications.

My Project structure

  • Data
  • DB Migration(built above data layer, because Entity Framework need data classes to generate migration)
  • Background Worker(built above Data Layer to execute background jobs)
  • Dtos
  • Services(use Dtos as Input/Output and use Data Layer to communicate with Database)
  • Apis(all controller can only use Services layer classes to modify Data)
  • SDK(Serialize Dtos Input as Json, use HttpRequest to make request to Apis then Deserialize the result to Dtos Output) and then, Unit Test for Services Layer.

after you publish your Apis, Publish also SDK and Dtos Class Library to Nuget. Other team which their application need to communicate with your Api just need to get the package from Nuget Repository.

Next

Please or to participate in this conversation.