PHP Classes
elePHPant
Icontem

File: examples/exampleFail.php

Recommend this page to a friend!
  Classes of Thomas Björk  >  Fuse Array  >  examples/exampleFail.php  >  Download  
File: examples/exampleFail.php
Role: Example script
Content type: text/plain
Description: Example on how not to use the class
Class: Fuse Array
Manage arrays with read only properties
Author: By
Last change: Moved to GitHub
Date: 5 years ago
Size: 223 bytes
 

 

Contents

Class file image Download
<?php
include('../fusearray.php');

$fuse = FuseArray::Convert(array(1,2,3,4));

array_shift($fuse); // Fails since fuse is an object and not an array

foreach($fuse as $key => $value) {
  echo
$key.' - '.$value.PHP_EOL;
}