Earlier quoted context omitted.
a "single for loop" and a "fibonacci method" are different enough. there are loads of people who take money for working in PHP, and they're closer to pc86's view of things than yours. I wouldn't say "99%" but... there's a lot. A LOT. I've run (and attended) several local tech meetups in my area, and ... there's a huge amount of technical talent, but also a surprising number of people bumbling around with wordpress, d…
Here, fibonacci implemented in a single for loop (obviously, there's cruft in there to modify the array but there's no need for us to be facetious). Feel free to wrap function call around it if the procedural nature makes you feel icky. $iterations = 50; $numbers = [1,0]; for($i=0; $i You seriously expect me to believe that 99% of PHP developers couldn't have written this?
Personally, I already said I don't think 99% is accurate, but... we'd have to define terms.
"PHP developer" - is that different from someone who modifies (or creates) PHP code as part of their job to earn a living? Maybe they're just "PHP workers"?
The very notion of "array_shift" and "array_push" is foreign to a non-trivial amount of PHP workers.
The word fibonacci is foreign to a hell of a lot of people who make their living in code.
I don't think you interact with beginners/amateurs enough to understand where pc86 was coming from.
If you describe fibonacci in english, gave some working parameters, I would be willing to bet 15-20% of people who self-identify as "PHP developers" (and get paid a wage for it) would struggle and ultimately fail that test above.
I still see code (not a lot, grant you) where people have not understood what passing a parameter to a function call means, and instead the first line of each function call is a string of "global $foo" stuff.