PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Dmitry Sheiko   PHP Typification Class   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Example
Class: PHP Typification Class
Check the types of parameters passed to a function
Author: By
Last change:
Date: 18 years ago
Size: 469 bytes


Class file image Download

// Example:
// Options of types specifing are similar Regular Expressions:
// type_of_value{left_limit,right_limit}[posible_value1|posible_value2]; ..

class Sample {
Sample() {
// Validate parameters types and values
new FuncParams("string{0,3}(abc|bbc); integer; array{2}; ArrayOfStrings");

$r = new Sample('abc', 2, array(1,2), array("123","ABC"));