Warning: file_put_contents(): Only -1 of 61 bytes written, possibly out of free disk space in /var/www/html/index.php on line 3

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 23

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/index.php:3) in /var/www/html/cache.php on line 25
Phar->isFlushingToPhar getVersion"HREF="function.phar-getversion.html"> Podręcznik PHP Poprzedni Następny (no version information, might be only in CVS) Phar->isFlushingToPhar -- ... Podręcznik PHP Poprzedni Następny (no version information, might be only in CVS) Phar->isFlushingToPhar -- ..."/>
Forum und email
Phar->isFlushingToPhar

Phar->isFlushingToPhar

(no version information, might be only in CVS)

Phar->isFlushingToPhar -- Used to determine whether a Phar creation transaction is active

Opis

void Phar->isFlushingToPhar ( void )

This method can be used to determine whether a Phar will save changes to disk immediately, or whether a call to Phar->commit() is needed to enable saving changes.

Phar transactions are per-archive, a transaction active on the foo.phar Phar archive does not affect changes to the bar.phar Phar archive.

Przykłady

Przykład 1. A Phar->isFlushingToPhar() example

<?php
$p
= new Phar(dirname(__FILE__) . '/brandnewphar.phar', 0, 'brandnewphar.phar');
$p2 = new Phar('existingphar.phar');
$p['file1.txt'] = 'hi';
var_dump($p->isFlushingToPhar());
var_dump($p2->isFlushingToPhar());
?>
=2=
<?php
$p
->begin();
var_dump($p->isFlushingToPhar());
var_dump($p2->isFlushingToPhar());
$p->commit();
?>
=3=
<?php
var_dump
($p->isFlushingToPhar());
var_dump($p2->isFlushingToPhar());
?>

Powyższy przykład wyświetli:

bool(true)
bool(true)
=2=
bool(false)
bool(true)
=3=
bool(true)
bool(true)