PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   Handle Inner Values   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: Handle Inner Values
Trait to allow accessing objects like Python lists
Author: By
Last change:
Date: 6 years ago
Size: 547 bytes
 

Contents

Class file image Download
<?php
require_once('HandleInnerValues.trait.php');
class
tada implements ArrayAccess{
    protected
$container=[];
    use
HandleInnerValues;
}
echo
'<pre>';
$tada=new tada();
$tada[]='papa';
$tada['["papa"][0][6]']='tada';
$tada['%[["papa"][0][6]]%']='tada';
for(
$i=0;$i<8;$i++){
   
$tada[]=$i;
}
print_r($tada);
print_r($tada['#%4:-3%#n']);
print_r($tada['#%papa:-3%#n']);//attention danger faites plutot
print_r($tada['#%papa:-3%#']);
unset(
$tada['#%4:-3%#n']);
print_r($tada);
$tada['#%3:0%#n']=range(1,7);
print_r($tada);


?>