PHP code example of san103 / php-holiday-api

1. Go to this page and download the library: Download san103/php-holiday-api 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/ */

    

san103 / php-holiday-api example snippets



use San103\Phpholidayapi\HolidayClient;

public function index(){

        $api = new HolidayClient();
        return $api
                    ->countryCode('uk') 
                    ->year('2023') 
                    ->result();
      
    }