PHP code example of wezom-agency / browserizr

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

    

wezom-agency / browserizr example snippets




use WezomAgency\Browserizr;




use WezomAgency\Browserizr;




use WezomAgency\Browserizr;




use WezomAgency\Browserizr;

$myCssClasses = Browserizr::detect()->cssClasses(['Mobile', 'Desktop'], '', false);
// ... work with array, e.g. array_push() or array_combine() or whatever you want




use WezomAgency\Browserizr;

Browserizr::detect()->setUserAgent('my own UserAgent string');

// then can test your browser correctly
var_export(Browserizr::detect()->isWindowsPhone());