Unfortunately it seems like this is not caused by the code that's been edited itself, but by the actions of the developer while they're editing it. As such, it's much more difficult to reproduce it reliably.
I have recorded a video of this while it happens -
http://www.youtube.com/watch?v=kYoERl_9A_g, using a trial version of Zend Studio 9.0.2
Usually it happens right after I press "Enter" to accept a code-assist option, or just using ctrl+space to insert the only proposal automatically. It can also happen after I delete/cut/paste a piece of code. In the above video, I couldn't cause the coloring to break until I added a parameter to method2. Once the corruption starts, it begins to move around while the code is edited, changing colors seemingly randomly accross the file. Cut and paste of the whole file contents doesn't fix it, somehow the corruption is preserved after the file has been emptied and then reappears after the content is pasted back again. It usually takes reopening of the file to fix the problem.
That's the code from the video:
- Code: Select all
<?php
class A {
public function method1(){
$this->method2($param);
}
public function method2($param){
echo $param;
}
}