summaryrefslogtreecommitdiff
path: root/tests/php/dbg.php
blob: 6f1dabc99785bbc6ca50babfea26898284029f94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php

/**
  *  For debugging tests
  *  
  */


function out($obj) {
    
    
    $cl_name =  is_object($obj) ?
                    get_class($obj) :
                    (is_array($obj) ? "Array" : "----");
                    
    echo "++++-" , $cl_name , "-++++\n";
    
    echo "\x1b[1;31m";
    echo "\n Native iterate:\n\n";
    foreach($obj as $k => $v) {
        echo "$k\t=>\t$v\n";
    }
    echo "\x1b[0m";

    
    TestValueIterator\loopValue($obj);
}



require './include/valueiterator/1.php';

#$arr  = array('qwe' => 'qweqweqweqw',5,'asd' => '«£¥§©®°±¶⅐⅒⅓⅘⅞Ⅻↆ❄❅❆⚑⚐⌛⌚〰»', 'zxccvx' => 'sdfsecvyh6bug6yfty',);
#$obj  = (object)$arr;
#$smpl = new SimpleClass;
#$it   = new impIterator;
#$iag1 = new impIterAggr1;
$iag2 = new impIterAggr2;


//out($arr);
#out($obj);
#out($smpl);
TestValueIterator\loopValue($iag2);
#out($it);
#out($iag1);
#out($iag2);