(PECL ds >= 1.0.0)
Ds\Queue::__construct — Cria uma nova instância
Cria uma nova instância, usando um objeto traversable
ou um array para os values
iniciais.
values
Um objeto traversable ou um array para usar como valores iniciais.
Exemplo #1 Exemplo de Ds\Queue::__construct()
<?php
$queue = new \Ds\Queue();
var_dump($queue);
$queue = new \Ds\Queue([1, 2, 3]);
var_dump($queue);
?>
O exemplo acima produzirá algo semelhante a:
object(Ds\Queue)#2 (0) { } object(Ds\Queue)#2 (3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant