<table><tr><td style="">mtijink added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7018" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>The example you provide still works for me. Maybe you meant <tt style="background: #ebebeb; font-size: 13px;">function foo($a = 1, $b)</tt>? That did not work previously either, since it would show the following signature: <tt style="background: #ebebeb; font-size: 13px;">[returntype] foo($a, $b = 1)</tt>. But that would be useful to show, indeed.</p>

<p>In a way, this code already does two passes, to record how many optional/non-optional arguments there are, but I see what you mean. The DUChain code now assumes that any default argument appears at the end of the argument list (and does not store anything for earlier arguments), which is why I chose this approach. I'll check if changing that behaviour is not too difficult.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R52 KDevelop: PHP Support</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7018" rel="noreferrer">https://phabricator.kde.org/D7018</a></div></div><br /><div><strong>To: </strong>mtijink, KDevelop, kfunk<br /><strong>Cc: </strong>kfunk, kdevelop-devel<br /></div>