Dutch PHP Conference 2027

Yaf_Session::count

(Yaf >=1.0.0)

Yaf_Session::countCount session entries

Açıklama

public function Yaf_Session::count(): int

Returns the number of entries in the session.

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

The number of session entries as an integer.

Örnekler

Örnek 1 Yaf_Session::count() example

<?php
$session = Yaf_Session::getInstance();
$session->start();

$session->set("user_id", 42);
$session->set("cart_items", 3);

var_dump(count($session));
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

int(2)

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top