[ create a new paste ] login | about

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

PHP, pasted on Oct 7:
1
2
3
4
5
6
7
8
9
<?php
    
    error_reporting(-1);

    $data = array('foo' => '42', 'bar');
    echo $data['spinach'];
    echo $data[1];

    print_r($data);


Output:
1
2
3
4
5
6
7
8
9

Notice: Undefined index:  spinach in /t.php on line 6

Notice: Undefined offset:  1 in /t.php on line 7
Array
(
    [foo] => 42
    [0] => bar
)


Create a new paste based on this one


Comments: