PHP Classes
elePHPant
Icontem

File: examples/test.php

Recommend this page to a friend!
  Classes of Ivan Melgrati  >  PHP Barcode Validator  >  examples/test.php  >  Download  
File: examples/test.php
Role: Example script
Content type: text/plain
Description: Class example file
Class: PHP Barcode Validator
Validate bar codes in several formats
Author: By
Last change:
Date: 3 months ago
Size: 377 bytes
 

Contents

Class file image Download
<?php
   
/**
     * @author Ivan Melgrati
     * @copyright 2018
     */
   
require_once ('../src/code-validator.php');

   
$code = '490154203237518';
    echo
'Is IMEI code "'.$code.'" valid? '. (CodeValidator::IsValidIMEI($code) ? 'true' : 'false'). '<br>';
   
   
$code = '9780596100674';
    echo
'Is ISBN "'.$code.'" valid? '. (CodeValidator::IsValidISBN($code, 13) ? 'true' : 'false'). '<br>';
?>