-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert 746b1cf "Access long value directly for call to count() in sim…
…plexml" The count() function has a tentative return type. Add a comment for the future.
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--TEST-- | ||
SimpleXMLElement::count() interaction with ReturnTypeWillChange | ||
--EXTENSIONS-- | ||
simplexml | ||
--FILE-- | ||
<?php | ||
|
||
class CustomClass extends SimpleXMLElement { | ||
#[\ReturnTypeWillChange] | ||
public function count(): string { | ||
return "3"; | ||
} | ||
} | ||
|
||
$sxe = simplexml_load_string("<root/>", CustomClass::class); | ||
var_dump(count($sxe)); | ||
|
||
?> | ||
--EXPECT-- | ||
int(3) |