[ create a new paste ] login | about

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

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:
posted by rtrt on Sep 23
gfgdfgfgf
reply
posted by rtrt on Sep 23
ertretert
reply
posted by rtrt on Sep 23
rtertr
reply
posted by rtrt on Sep 23
dfwerwerer
reply
posted by rtrt on Sep 23
ewerer
reply
posted by rtrt on Sep 23
rgrtert
reply