PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Martin Alterisio   Generic Array   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Generic Array
Create arrays that allow members of just one type
Author: By
Last change: Access without login.
Date: 17 years ago
Size: 247 bytes
 

Contents

Class file image Download
<?php
/**
 * @ignore
 */

/**
 * @ignore
 */

require_once 'genericarray.lib.php';

/**
 * @ignore
 */
class Foo {
}

$array = new ArrayOfFoo();
$array[] = new Foo();
// this will fail: is not a Foo object.
$array[] = 12;
?>