Earlier quoted context omitted.
I'm a PHP developer that works for a major media company. We do large scale deployments, and I'd like to say that PHP is a terrible language that gets a bad rap. It's getting better, and it's already 1000000x better than the PHP4 days, but it's still not a nice language. It's not a nice runtime. The only thing nice about it is that a zillion people and their dogs all know it and it's relatively easy to deploy.
Any experience with HHVM yet?
Lumen – A micro-framework by Laravel
81–90 of 116 posts
Re: Lumen – A micro-framework by Laravel
#82They compare it to Slim 3, which isn't completed yet, sitting in a development branch... Slim 3 will also be PSR-7 compliant, I don't see anything about that anywhere in these Lumen docs.
The framework's author addressed this on reddit: http://www.reddit.com/r/PHP/comments/32kajb/lumen_php_microf...
Thanks!
Re: Lumen – A micro-framework by Laravel
#83I think many frameworks allow you to include the "basic" subset of the framework, without running all the usual Inversion of Control bootstrapping.
Re: Lumen – A micro-framework by Laravel
#84Anyone still using PHP in 2015 is doing it wrong.
Anyone still hating on PHP in 2015 is doing it wrong.
http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this...
Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.
Re: Lumen – A micro-framework by Laravel
#85Earlier quoted context omitted.
I completely agree. I've used Slim in lieu of Laravel for a number of small API projects. I'm excited about porting them over to Lumen.
Have you ever tried Flight, http://flightphp.com ? It has a smaller footprint than Slim but still has the ability to drop in PHP components. Disclaimer, I'm the author of Flight.
Re: Lumen – A micro-framework by Laravel
#86Re: Lumen – A micro-framework by Laravel
#87Earlier quoted context omitted.
I wouldn't be surprised if those memory leaks were due to an older version of PHP (GC was recently improved a lot to clean up circular references) or a poorly-written framework, which most of them are. Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. I've used PHP a few times in the past…
> Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. IIRC arrays are always passed by reference and only duplicated if you modify the data inside the called function (if not passed with '&' of course) ?
> only duplicated if you modify the data inside the called function
I did not know that. Because I've observed the duplication behavior, I assumed that it was never a reference. I guess that's a "feature" when you don't really have any fine-grained, explicit control over pointers or references.
Re: Lumen – A micro-framework by Laravel
#88Earlier quoted context omitted.
> Some people also don't understand that arrays of large data have to be wrapped in objects or explicitly passed by reference in many situations to avoid duplicating them in memory. IIRC arrays are always passed by reference and only duplicated if you modify the data inside the called function (if not passed with '&' of course) ?
Correct. The runtime uses a copy-on-write implementation when you pass an array by value. Duplicating an array in memory every time it is passed to or from a function would be awful.
This might be because I originally learned PHP about 16 years ago, but I could swear this used to be the case. There's definitely a reason PHP has the reputation it has, although many of those glaring issues have since been fixed.
Re: Lumen – A micro-framework by Laravel
#89Earlier quoted context omitted.
Anyone still hating on PHP in 2015 is doing it wrong.
No. http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this... Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.
Why would you think the third value in ['ab', 'cd', '10', 'gh', '24'] would have a key of '10'? That's the value, not the key.
The docs are quite clear on how this works:
http://php.net/manual/en/control-structures.foreach.php
foreach (array_expression as $value)
vs.
foreach (array_expression as $key => $value)
Re: Lumen – A micro-framework by Laravel
#90Earlier quoted context omitted.
No. http://www.reddit.com/r/PHP/comments/2zhg6z/how_true_is_this... Read that and tell me that it is Ok..And see how that comment has been downvoted. That is PHP community for you. In 2015.
A single downvote on a subreddit is indicative of the PHP community as a whole? Well, shit, time to ditch the language... Why would you think the third value in ['ab', 'cd', '10', 'gh', '24'] would have a key of '10'? That's the value, not the key. The docs are quite clear on how this works: http://php.net/manual/en/control-structures.foreach.php foreach (array_expression as $value) vs. foreach (array_expression as $…
Can you please take one more look? Values in the first array is used as keys to set values in the second array..