PHP code example of funct-gmbh / php-watcher

1. Go to this page and download the library: Download funct-gmbh/php-watcher 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/ */

    

funct-gmbh / php-watcher example snippets


declare(ticks = 1);

pcntl_signal(SIGTERM, 'terminationHandler');

function terminationHandler()
{
    // ...        
}
bash
composer global 
bash
php-watcher [your php app]
bash
php-watcher server.php --arguments localhost --arguments 8080
bash
php-watcher --watch src --watch config server.php
bash
php-watcher server.php --ext=php,yml
bash
php-watcher server.php --ignore public/ --ignore tests/
bash
php-watcher server.php --ignore src/config.php
bash
php-watcher server.php --ignore 'src/config/*.php'
bash
php-watcher server.php --delay 10 
bash
php-watcher server.php --delay 2.5 
yml
executable: php
bash
php-watcher server.php --exec php7
bash
php-watcher --signal SIGTERM server.php
bash
php-watcher server.php --no-spinner