Modern PHP is one of the fastest dynamic languages, has one of the best gradual typing systems (IMO almost competitive with TypeScript - TypeScript type system is better at static typing, but doesn't catch runtime errors), and a fantastic community around Laravel/Symphony.
* A language-browsable std lib or trivial reflection
* A consistent API where expectations are reusable
* eg., polymorphic operators "do the right thing"
* Optional typing
* Typing, when present, facilitates polymorphism
* Data processing handed off to fast VM plugins
* Target of major trans-lang libraries (eg., Spark, et al.)
* Good long-running performance
* Community preference for minimalism and clarity
* Easy package management
* Modern functional primitives (eg., comprehensions)
* Modern OO primitives (eg., extension methods)
* Modern metaprogramming primitivates (eg., reified classes)
And probably others. Each poorly provided feels like taking a big step back; and just an injury to my productivity.
I'm not sure I'd get over how manically procedural PHP is; how sequential by nature. Every OO or functional addition runs against its grain and feels random and accidental.
I think one of the things holding back 'modern' php is the lack of adopting a proper construct for dealing with threads/async operations. Whether its going to be promises/futures, async await operators or what have you, The inability to easily write async PHP hamstrungs it alot.
Its 2019, and I still can't daemonize a PHP process without it leaking memory all over the place.
I agree with this. I'm struggling to get out of my current role/job right now, because I want to move away from PHP (I'm really growing to dislike it as a whole, and in my personal experience have some very negative connotations around the development practices of the PHP developers I deal with on a day in day out basis)
I been looking at C#, what did you find was easy to translate to quickly?
Ignore all the java lipstick that went on after PHP5; PHP doesnt work like a static language and C#/Java really quite different.
Python fits the mental model of PHP far more closely, in that everything you expect to be able to do easily (dynamic dispatch, OO, closures, etc.) are easy. And everything hard (mixins, metaprogramming, etc.) is about as hard.
Most things are easier.
C# may seem more "grown up". From a PHP-culture perspective "Java OO" is grown up, and "procedural C" is babyish. That has more to do with PHP3 vs PHP5 than either Java or C. The latter of which, as with python, includes the best programmers in the world.
From a web job-market perspective I can't say. I got into data science a few years ago, and haven't much contact since. C# may make more sense; it would have back when I was in the area.
I actually started with Python, and ended up on PHP because of job changes in the last 2 years (my employer closed their satellite teams so I jumped to a local university. Turns out Drupal is huge in university land, and so PHP. Has not been a stellar experience. I think I had some pre-formed notion that I'd at least be working on more interesting problems, but alas).
I would love to get back to Python, but where I live I mostly see Java/C# job openings (I don't want to live in the Bay Area. My wife has health issues and its complicated to get her care set up again).
and I can't seem to find any places hiring remote Python devs (I did web backends in Python, for reference, not data science. I don't have a CS degree, so I feel timid trying to pushing into Data Science even though I'm a quite knowledgeable Python programmer. I still keep up with all the latest Python news and libraries even).
I'm torn on what to do next. I really would love writing Python full time again. Hell, I'd love to do just front-end web development full time even. I have so much more passion for either than I have writing PHP code. I feel like a glorified Forms creator. Nothing of remote interest is happening in PHP land for me.
When I wrote Python full time we did real-time networking and web back ends. Lots of websocket programming. Async/Await had just taken hold (I came up on Python 3.4 and by the time I was writing it full time we had updated to Python 3.6+). DataClasses was sooo exciting to me. I just miss that energy.
Now with static site generators becoming so vogue I can see all the potential in the world Python has to make the day to day web development experrience so good (IMO, its better at munging data than even gatsby is. Numpy, SciPy, etc. combined with a gatsby-like platform that normalizes all your data into consumable views would be mind blowing)
I know this is a bit of a rant, but I really miss that energy I had when I was living in Python all day. Things just made sense to me. And if I ever had a real performance bottleneck, I could always write a C extension.
Maybe I just need to job hunt better. Unforunately if I can't do C#/Java it needs to be remote work, and I don't feel like I meet the qualifications for any places that hire remote workers. They all want super engineers and I don't really know if I am one :(
For most people, programming language ends up being a very minor contributor to their level of happiness at work. Manager, teammates, and interest in their project (in roughly that order) are the major factors that drive workplace satisfaction.
All that is to say: Probably don't sweat so much over what programming language you use. If the good jobs in your area are C#/Java, then do C#/Java.
> They all want super engineers and I don't really know if I am one :(
The standard is probably far lower than what you're imagining. If you're able to make progress and get things done without consistent supervision, then you're already a "super engineer". Don't be afraid to apply and interview for roles that you're interested in. If you get rejected, 95% of the time it's not because you didn't meet the bar, it's just bad luck (interview loop with incompatible people, too many qualified people applied, etc.) Try not to get discouraged if this happens.
Give C# a go. I'm a full-time PHP programmer, and C# has a lot of great things that PHP probably never will.
> Nothing of remote interest is happening in PHP land for me.
Nobody can make you interested in anything you don't want to be, but I'm trying to solve a bunch of non-trivial issues here: https://github.com/vimeo/psalm/issues
Not trying to discount your opinion, but it sounds like much of your complaints are related to Drupal more than to PHP. Any job building web forms or hacking on a CMS is going to get old real fast, and those exist in every language used on the web. Work more interesting than building basic CRUD exists in PHP too.
To expand, its not just that. I actually find when I'm working on Drupal I'm at least working fast (its easy stuff for the most part).
I do alot of work for research departments, and that is very boring. Its the same 4 types of form validations over and over, and any attempts I've made to try and abstract over any of it to make the work less repetitive and there by increase productivity, is seen as actively hostile or "in non-alignment with current goals and funding"
Some of my issues is with how things operate where I am, I think, I will admit that.
> Some of my issues is with how things operate where I am, I think, I will admit that.
Judging from the previous paragraph, this very much. Initiatives to improve workflows or repetitive tasks being shot down is something I usually just know from big-Corp.
As a side note, if you can't reactor the actual code base to abstract away from what sounds like mostly copy and paste, could you just create a tool that would spit out the form validation code? Pass it form element names, types, constraints and get some delicious code. ;-)
I switched from PERL & ColdFusion to PHP back in 2000 and stuck through every version up to 7 for web app development. I've built apps in both Python and C# (mostly game projects) but never got comfortable with either as a web development language.
It was only when I started working in Go a few years back that I was able to completely walk away from PHP. There is literally nothing I was doing with PHP that I can't do in a more satisfying way with Go and I like compiling everything into a single binary when I'm ready to deploy.
Back in 2008, I chose PHP for my first forays into web programming because of how easy it was to setup and use compared to other solutions I was aware of. The last time I touched it was back in 2011. Python has pretty much completely replaced PHP for me. Get a good basic web framework like CherryPy or Bottle and couple it with a templating engine like Jinja2 or Mako and you can do anything you could do in PHP, but in a better ecosystem.
"I really struggle to see what the case is for PHP anymore."
PHP started as a language for creating dynamic websites and that's still it's forte. I'm not a fan of the language, but it still retains advantages over it close rivals Python and Ruby when it comes to creating dynamic websites. It's faster than those languages, and its popularity means you can find web development libraries for just about anything.
It's also the only language with almost universal support amongst web hosts. It can run on basic shared hosting plans and on nearly every server. It can be deployed by simply uploading your code to a directory on your web host. Many developers (especially of other languages) vastly underestimate how important this is or the opportunities it unlocks.
It's 2019 and if you want a simple [1] way for your non-technical users or customers to self-install your software on a web server, you are simply out of luck.
Having a ridiculously easy web app installation process for servers would unlock countless opportunities for developers to reach more users or customers. But developers simply can't see it.
Isn't it kind-of crazy that web-friendly languages like Python and Ruby are anything but simple if you want to bundle and distribute your web app for easy server deployment?
By the way, here's an excerpt from a blog post by programmer Jeff Attwood:
"If you want to produce free-as-in-whatever code that runs on virtually every server in the world with zero friction or configuration hassles, PHP is damn near your only option. If that doesn't scare you, then check your pulse, because you might be dead."
To broaden choice, Attwood argues we should
"build compelling alternatives and make sure these alternatives are equally pervasive, as easy to set up and use as possible."
I maxed out '04 to '14.
After working in a dozen other languages, the only motivation left seems to be sunk-costs and job-market openings.
It's so domain-specific that you're hamstringing yourself in the future.
That you'd create a new language out of PHP just seems mad.
Who's the audience?
The pragmatic (market) motivations don't exist.