1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 01:02:25 +01:00
Files
archived-php-src/ext/opcache/tests/bug75608.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

36 lines
935 B
PHP

--TEST--
Bug #75608 ("Narrowing occurred during type inference" error)
--EXTENSIONS--
opcache
--FILE--
<?php
class ReactionRatingService
{
public function calculateBoostPoints()
{
while ($reaction = $reactions) {
$reactionRatings = $this->validFunction();
$totalWeight = 0;
$runningScore = 0;
$queue = [];
foreach ($reactionRatings as $ratingData) {
if ($runningScore != $reaction['Score']) {
if ( ! $ratingData['BoostEarned']) {
$queue[] = $ratingData['UserID'];
}
} else {
foreach ($queue as $userId) {
$userBoostPointsRecalculate[$userId][] = $reaction['ID'];
}
}
$totalWeight += $ratingData['Weight'];
}
}
}
}
?>
OK
--EXPECT--
OK