zendtech / ZendOptimizerPlus

Other
914 stars 142 forks source link

useless 'instanceof' removal pass #194

Open jpauli opened 9 years ago

jpauli commented 9 years ago

I met some users that used such statements just to hint their IDE about auto-completion.

$a instanceof Foo;

This is a useless statement that gets compiled and run every time for nothing (usually 3 OPCodes involved)

This PR adds a pass to optimize such statement

Ocramius commented 9 years ago

Missing test case?