PHP code example of yu-corder / php-rcs

1. Go to this page and download the library: Download yu-corder/php-rcs 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/ */

    

yu-corder / php-rcs example snippets




declare(strict_types=1);

use YuCorder\RcsManager;

$rcs = new RcsManager();

// Check in a file
$rcs->checkIn('example.txt', 'Initial version');

// Restore a previous version
$rcs->checkOut('example.txt', 1);

// Retrieve revision history
$history = $rcs->log('example.txt');

print_r($history);
bash
composer 
bash
php bin/rcs
bash
php bin/rcs checkin example.txt "Initial version"
bash
php bin/rcs checkout example.txt 1
bash
php bin/rcs log example.txt
bash
vendor/bin/php-cs-fixer fix