News for hackers. Stuff that matters.
Re:Phan by Etsy – A Static Analyzer for PHP 7+ by asm on Tuesday December 08, 2015 @10:38AM (#10696957)
Phan does not attempt to make sense of things like `$class_name->$function_name()` or `$$v`. I'd be happy to see a pull request that could handle simple strings, but otherwise I imagine the best we can do is emit a warning.

I'm not sure what SIMD refers to. Can you clarify that?

Re:Phan by Etsy – A Static Analyzer for PHP 7+ by gravypod on Tuesday December 08, 2015 @03:30PM (#10699241)
I wrote this when I had just woke up as I was excited, so I had to get a question in. I think what I meant was passing functions into other functions.

I do this for things like:

$user_requirements = [filter1, filter2];

foreach ($user_requirements as $test) { if (!$test($some_data)) { return false; } return true; }

Is there any way to tell the analyzer to make sure that afunction of n arguments is passed in?

Re:Phan by Etsy – A Static Analyzer for PHP 7+ by StefanKarpinski on Tuesday December 08, 2015 @12:54PM (#10698041)
What about `$$$v`? Does it handle `$$$v`?
Re:Phan by Etsy – A Static Analyzer for PHP 7+ by merlincorey on Tuesday December 08, 2015 @12:04PM (#10697680)
> I'm not sure what SIMD refers to. Can you clarify that?

With a name like "asm" that comes as a surprise... Single Instruction Multiple Data[0] refers to low level processor instructions that are able to work across a range of data, e.g. video cards working on changing the values in a framebuffer with one instruction mapping across an entire buffer in parallel.

[0] https://en.wikipedia.org/wiki/SIMD

Re:Phan by Etsy – A Static Analyzer for PHP 7+ by giaour on Tuesday December 08, 2015 @12:40PM (#10697950)
That doesn't clarify what the OP meant. PHP does not allow you to issue processor instructions directly.
Re:Phan by Etsy – A Static Analyzer for PHP 7+ by psaintla on Tuesday December 08, 2015 @01:25PM (#10698257)
I'm going to take a crazy leap here based on the commits. asm might not stand for what you think.