PHP code example of rechtlogisch / steuer-id

1. Go to this page and download the library: Download rechtlogisch/steuer-id 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/ */

    

rechtlogisch / steuer-id example snippets


isSteuerIdValid('02476291358'); // => true

use Rechtlogisch\SteuerId\SteuerId;

(new SteuerId('02476291358'))
    ->validate() // ValidationResult::class
    ->isValid(); // => true

putenv('STEUERID_PRODUCTION=true');

validateSteuerId('x2476291358')->getErrors();
// [
//   'Rechtlogisch\SteuerId\Exceptions\SteuerIdCanContainOnlyDigits'
//    => ['Only digits are allowed.']
// ]

use Rechtlogisch\SteuerId\SteuerId;

(new SteuerId('x2476291358'))
    ->validate() // ValidationResult::class
    ->getErrors();
// [
//   'Rechtlogisch\SteuerId\Exceptions\SteuerIdCanContainOnlyDigits'
//    => ['Only digits are allowed.']
// ]