П️
Size: a a a
П️
П️
S
П️
return $posts ? array_values(
array_filter($posts,
function ($pic) {
/** @var boardImage $pic */
return $pic->id > $this->last_id;
}
)
) : [];
П️
Н
YH
Н
Н
Н
Н
AM
class boardImage {
public int $id;
public int $width;
public int $height;
...
$posts = json_decode(file_get_contents($url));
return $posts ?
array_values(
array_filter($posts, function (boardImage $pic) {
return $pic->id > $this->last_id;
})
) :
[];
>>>PHP Fatal error: Uncaught TypeError: Argument 1 passed to ...::{closure}() must be an instance of boardImage, instance of stdClass given
П️
П️
AM
AM
private ?resource $locked_file;не понятно
/* ... */
$this->locked_file = fopen(self::LOCKFL_PATH, 'c+');
>> PHP Fatal error: Uncaught TypeError: Typed property ...::$locked_file must be an instance of resource or null, resource used