array_push
laravel/framework
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Push one or more elements onto the end of array
array_push
(array &
$array
,
mixed
...
$values
):
int
$collectionCount
=
$this
->
count
();
foreach (
range
(
1
,
min
(
$count
,
$collectionCount
)) as
$item
) {
array_push
(
$results
,
array_pop
(
$this
->
items
));
}
return new static(
$results
);
src/Illuminate/Collections/Collection.php
$collectionCount
=
$this
->
count
();
foreach (
range
(
1
,
min
(
$count
,
$collectionCount
)) as
$item
) {
array_push
(
$results
,
array_shift
(
$this
->
items
));
}
return new static(
$results
);
src/Illuminate/Collections/Collection.php
public function
tag
(
$value
)
{
array_push
(
$this
->
tags
,
$value
);
return
$this
;
}
src/Illuminate/Mail/Mailable.php
public function
tag
(
$value
)
{
array_push
(
$this
->
tags
,
$value
);
return
$this
;
}
src/Illuminate/Notifications/Messages/MailMessage.php
public function
pipe
(
$pipes
)
{
array_push
(
$this
->
pipes
, ...(
is_array
(
$pipes
) ?
$pipes
:
func_get_args
()));
return
$this
;
}
src/Illuminate/Pipeline/Pipeline.php
protected function
storeRawBlock
(
$value
)
{
return
$this
->
getRawPlaceholder
(
array_push
(
$this
->
rawBlocks
,
$value
) -
1
);
}
src/Illuminate/View/Compilers/BladeCompiler.php
foreach (
$returnedMembers
as
$member
) {
$this
->
assertContains
(
$member
,
$members
);
array_push
(
$result
,
$member
);
}
} while (
$iterator
>
0
);
tests/Redis/RedisConnectionTest.php
public function
log
(...
$values
)
{
array_push
(
$this
->
values
, ...
$values
);
return
$this
;
}
tests/Support/SupportConditionableTest.php