PHP code example of gertexllc / yii2-bootstrap-detector
1. Go to this page and download the library: Download gertexllc/yii2-bootstrap-detector 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/ */
gertexllc / yii2-bootstrap-detector example snippets
use gertexllc\yii2bootstrapdetector\BootstrapDetector;
// Detect the full version number
$detector = new BootstrapDetector();
$version = $detector->detectVersionNumber(); // e.g. "4.6.0"
// Detect the major version number only
$detector = new BootstrapDetector();
$majorVersion = $detector->detectMajorVersion(); // e.g. "4"