$a1 = ["hello", "world", "!"]
$a2 = array("hello", "world", "!");
$a3 = explode(",", "apple,pear,peach");

#Mixed int and string keys

$array = array(
    "foo" => "bar",
    "bar" => "foo",
    100   => -100,
    -100  => 100,
);
var\_dump($array);

#Short array syntax

$array = [
    "foo" => "bar",
    "bar" => "foo",
];
Comments