PHP code example of lkt / app-version

1. Go to this page and download the library: Download lkt/app-version 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/ */

    

lkt / app-version example snippets


\Lkt\AppVersion::readFromComposerFile(__DIR__ . '/path/to/composer.json');

\Lkt\AppVersion::setVersion(1, 0, 0); // Major, Minor, Patch
\Lkt\AppVersion::setVersion('1.0.0'); // All-in-one Major.Minor.Patch

\Lkt\AppVersion::get(); // Returns version as a dot separated string
\Lkt\AppVersion::getAsNumber(); // Returns version as a number