PHP code example of elegasoft / product-version

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

    

elegasoft / product-version example snippets


ProductVersion::current(); 

// Output Example: v1.0.3-125-0ca4a7187

// Starting w: v1.0.3-125-0ca4a7187

ProductVersion::bump(); 

// Output Example: v1.0.4-125-0ca4a7187

// Starting w: v1.0.3-125-0ca4a7187

ProductVersion::bump($major = true, $minor = false); 

// Output Example: v2.0.0-125-0ca4a7187

// Starting w: v1.0.3-125-0ca4a7187

ProductVersion::bump($major = false, $minor = true); 

// Output Example: v1.1.0-125-0ca4a7187