Login   Register  
PHP Classes
elePHPant
Icontem

File: examples/simple-verifier.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Camilo Sperberg  >  PHP Valida RUT  >  examples/simple-verifier.php  >  Download  
File: examples/simple-verifier.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Valida RUT
Validate RUT Chilean numbers
Author: By
Last change: JavaScript is now loaded from another repository

Also updated composer.json with this new repository
Code cleanup
Date: 3 months ago
Size: 494 bytes
 

Contents

Class file image Download
<?php

include('../vendor/autoload.php');

$rutVerifier = new unreal4u\rutverifier();

var_dump($rutVerifier->isValidRUT('30.686.957-4'));
var_dump($rutVerifier->isValidRUT('30686957-4'));
var_dump($rutVerifier->isValidRUT('306869574'));

var_dump($rutVerifier->isValidRUT('30.686.957-0'));

var_dump($rutVerifier->formatRUT('30.686.957-0'false));

echo 
$rutVerifier.'<br />'.PHP_EOL;

// Include javascript validation with the following function:
echo $rutVerifier->constructJavascript();