PHP Classes

File: test.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Moïse   Array Depth   test.php   Download  
File: test.php
Role: Example script
Content type: text/plain
Description: example script
Class: Array Depth
Traverse arrays in depth to perform useful actions
Author: By
Last change:
Date: 6 years ago
Size: 1,278 bytes
 

Contents

Class file image Download
<?php
require_once('array_depth.php');

echo
'<pre>';
echo
array_depth(array(array(array(array(1,array()))),array(array())));echo'<br>';
echo
array_depth(array(array(array(array(1,array(),array())))));echo'<br>';
echo
array_depth(array(array(array(array(1,45))))); echo'<br>';
echo
array_depth(array(array(),array(array()),array())); echo'<br>';
echo
array_depth(1);echo'<br>';


var_dump(homogeneous(array(/*1,45,'uuu',*/array(array(array(1)))))); echo'<br>';
var_dump(homogeneous(array(array(),array(array()),array()))); echo'<br>';
var_dump(homogeneous(array(1,2,3))); echo'<br>';
var_dump(homogeneous(array(1,2.5,3))); echo'<br>';
var_dump(homogeneous(array(array(1),array(2.5),array(3)))); echo'<br>';


$type=true;
var_dump(homogeneous(array(array(1.5,array(2.5)),array(2.5,array(2.5)),array(3.5,array(2.5))),$type)); echo'<br>';
echo
$type; echo'<br>';

$type=true;
var_dump(homogeneous(array(array(),2),$type)); echo'<br>';
echo
$type; echo'<br>';

var_dump(typesof(array(array(),array(array()),array()))); echo'<br>';

var_dump(signature(array(array(),array(array()),array()))); echo'<br>';

var_dump(rowsandcol($x=array(array(1,'c'=>2,3),array(1,'c'=>2,3),array(1,'c'=>array(),3)),$xiayo)); echo'<br>';

print_r( $xiayo);



?>