PHP's FFI support is a feature that's 2/3 there and isn't seeing improvements. It makes me miss Python's cffi.
The Rise of Hybrid PHP: Blending PHP with Go and Rust
31–40 of 158 posts
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#32But as PHP have released newer versions I'm convinced our migration away from PHP (which is just finishing) is probably a step backwards _now_ that PHP is awesome.
Everyone still thinks it is like 5.x days, it really isn't.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#33Joined {{company}} when everything was using 5.4, there was a big distaste of PHP back then. But as PHP have released newer versions I'm convinced our migration away from PHP (which is just finishing) is probably a step backwards _now_ that PHP is awesome. Everyone still thinks it is like 5.x days, it really isn't.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#34Joined {{company}} when everything was using 5.4, there was a big distaste of PHP back then. But as PHP have released newer versions I'm convinced our migration away from PHP (which is just finishing) is probably a step backwards _now_ that PHP is awesome. Everyone still thinks it is like 5.x days, it really isn't.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#35> In short, the modern PHP ecosystem gives us the best of both worlds: the ability to build quickly and confidently in PHP, while still having powerful options (C, Rust, Go) for performance-critical parts. This hybrid approach lets us stay productive without sacrificing speed where it matters most. I understand this for a large codebase where rewriting is not feasible. But if that wasn't the case, a C# APIs achieves…
Yeah theres a bunch of oddities that rear their head from time to time.
I've had one peculiar JSON de-serialize bug lately that really threw me for a while. I normally do the json_decode() with the second arg set true, which yields an assoc arr. This doesn't tell the whole story though. IF the key is numeric when decoding, PHP will make its key an int! and not a string like the rest. I'm guessing it does the equivalent of an is_numeric() check or something.
This yields an array with keys which could be ints and strings :/
Still for all its warts though it is a fantastically Frankenstein of a language!
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#36Earlier quoted context omitted.
The only reason PHP still exists is because of shared hosting companies and Wordpress. PHP’s initial appeal was you could do scripting on the server side, “turn off PHP with a ?>” spit out normal html, and “turn back on PHP with a For a beginner programmer, it was simple, easy to understand, and had an include so your designs were’t nested table hairball messes of garbage. (but your CSS was definitely garbage). Today…
PHP might have a bad reputation but I honestly don’t think JavaScript is a better language in real world terms. I do get why JS appeals to people, but switching from PHP to JS feels a little winning an internet argument — you might feel smarter for doing so but in reality all you’ve done is sunk time into something that doesn’t make you any better off.
For PHP on the other hand - even when I started writing PHP3 - so certainly not the very beginnings, it's clearly just cobbling together whatever works from unrelated half-understood parts and so there's no coherent centre to it, when I last worked on some PHP earlier this year it still felt like bailing wire and string.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#37Sometimes I think we should go back to basics: pixels, data, latency / bandwidth. The web is an optimization problem in the sense that we want to render correct pixels at perceptual speed given latency and bandwidth constraints. It should be more like: what pixels is the user about to see? What data is need to set the the pixels? What data is likely needed next and optimistically pre-fetch - something like that.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#38Joined {{company}} when everything was using 5.4, there was a big distaste of PHP back then. But as PHP have released newer versions I'm convinced our migration away from PHP (which is just finishing) is probably a step backwards _now_ that PHP is awesome. Everyone still thinks it is like 5.x days, it really isn't.
I'm not so sure: If you think about hiring talent, there's a perception in the wider industry about PHP (rightly or wrongly, let's not debate that here) that'll prevent access to a lot of great developers. So even if not warranted anymore on technical merits anymore, in terms of employer branding, I'd say migrating away from PHP is helping.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#39Sometimes I think we should go back to basics: pixels, data, latency / bandwidth. The web is an optimization problem in the sense that we want to render correct pixels at perceptual speed given latency and bandwidth constraints. It should be more like: what pixels is the user about to see? What data is need to set the the pixels? What data is likely needed next and optimistically pre-fetch - something like that.
Thinking about user seeing pixels is seeing just a part of the picture. As all software projects you don't optimize just for immediate user experience but also development time. Time to first draw rarely coincides with development time.
Re: The Rise of Hybrid PHP: Blending PHP with Go and Rust
#40Earlier quoted context omitted.
PHP might have a bad reputation but I honestly don’t think JavaScript is a better language in real world terms. I do get why JS appeals to people, but switching from PHP to JS feels a little winning an internet argument — you might feel smarter for doing so but in reality all you’ve done is sunk time into something that doesn’t make you any better off.
There's a firm foundation in Javascript. The choices aren't choices I'd make but they're choices I understand. Brendan Eich knew what he was doing and it shows, indeed if it was made simply of bailing wire and string it'd have been replaced. For PHP on the other hand - even when I started writing PHP3 - so certainly not the very beginnings, it's clearly just cobbling together whatever works from unrelated half-unders…
Equally, PHP3 is worlds apart from modern PHP.
Your point is a little like saying “motorbikes are easy to maintain because they’re based on the penny-farthing”. Times have changed and your references are literally decades out-of-date.