PHP Classes

File: testValidEmail.php

Recommend this page to a friend!
  Classes of David Domingues  >  PHP String Manipulation Library  >  testValidEmail.php  >  Download  
File: testValidEmail.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP String Manipulation Library
Validate and manipulate text strings in a few ways
Author: By
Last change:
Date: 2 years ago
Size: 685 bytes
 

Contents

Class file image Download
<?php
   
use App\StringLib as lib;

    include_once
"class/string.class.php";


   
$email = "dadomingues@gmail.com";
   
$a = new lib\ValidateString();

   
// Validate if email is valid
   
$b = $a->isEmail($email);
    print
'<br>Validate if email '.$email.' is valid: ';
   
var_dump ($b);

   
// Validate if email is valid and exists
   
$b = $a->isEmail($email, true);
    print
'<br>Validate if email '.$email.' is valid and exists: ';
   
var_dump ($b);

   
// Validate if email is valid and exists
   
$email = "dadominguescccccccccc@gmail.com";
   
$b = $a->isEmail($email, true);
    print
'<br>Validate if email '.$email.' is valid and exists: ';
   
var_dump ($b);

?>

For more information send a message to info at phpclasses dot org.