[ create a new paste ] login | about

Link: http://codepad.org/EkJ9y1AB    [ raw code | output | fork ]

PHP, pasted on Oct 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

$arr = array(

    0.10 => 'true'

);

foreach ($arr as $key => $val) {
    var_dump($key);
    if (is_int($key)) {
        echo 'is int';
    }
    echo "\n";
    if (is_numeric($key)) {
        echo 'is numeric';
    }
}

?>


Output:
1
2
3
int(0)
is int
is numeric


Create a new paste based on this one


Comments: