PHP Classes

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: Fixed version numbers
Renamed package

Renamed package to barcode-validator. This reflects more closely what
the package actually does. Updated Documentation and Example
Date: 3 years ago
Size: 382 bytes
 

Contents

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

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