PHP code example of phpfastcache / couchbasev4-extension

1. Go to this page and download the library: Download phpfastcache/couchbasev4-extension library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

phpfastcache / couchbasev4-extension example snippets


composer install phpfastcache/couchbasev4-extension

try {
    \Phpfastcache\Drivers\Couchbasev4\Driver::prepareToFork();
    $pid = pcntl_fork();
    if ($pid == -1) {
        // There was a problem with forking the process
    } else if ($pid) {
        // continue parent process operations
    } else {
        // continue child process operations
    }
} catch (PhpfastcacheDriverCheckException) {
    // the driver did not allow you to fork the process
}