| Summary: | Array containing a class instance dereferencing | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | itay friedman <itay.f> | ||||
| Component: | PDT | Assignee: | PHP Core <php.core-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jacek.pospychala, silviya | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
fixed Verified. The example should be changed like this:
<?php
class myClass{
function foo(){
return 0;
}
}
$arr= array (0, new myClass(), 3);
echo $arr[1]->|
Closing.
|
Created attachment 210103 [details] example test When creating an array which contains an instance of a class like so: $arr= [0,new myClass,2]; The class methods aren't shown in code assist for $arr[1]->|. It will apear however if the array is defined by $arr= [0,$o,2]; when $o is an instance of myClass. The example test attached produces: junit.framework.AssertionFailedError: EXPECTED COMPLETIONS LIST: ----------------------------- method(foo) ACTUAL COMPLETIONS LIST: -----------------------------