PHP Classes

File: cli/includes/compatibility.php

Recommend this page to a friend!
  Classes of Joaquin   Laravel Valet Linux   cli/includes/compatibility.php   Download  
File: cli/includes/compatibility.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Laravel Valet Linux
Run Laravel environment under a Linux machine
Author: By
Last change: Update of cli/includes/compatibility.php
Date: 5 years ago
Size: 367 bytes
 

Contents

Class file image Download
<?php

/**
 * Check the system's compatibility with Valet.
 */
$inTestingEnvironment = strpos($_SERVER['SCRIPT_NAME'], 'phpunit') !== false;

if (
PHP_OS != 'Linux' && ! $inTestingEnvironment) {
    echo
'Valet only supports Linux.'.PHP_EOL;

    exit(
1);
}

if (
version_compare(PHP_VERSION, '5.6', '<')) {
    echo
"Valet requires PHP 5.6 or later.";

    exit(
1);
}