数组和集合 / 字典

<?php

//In PHP there are no
//Dictionary type, use array instead
$dic1 = [1 => "one"];

$strValue = $dic1[2];
//strValue is null

$dic2 = ["one" => 1];

$intValue = $dic2["two"];
//intValue is null

echo "strValue = "is_null($strValue), "\n";
echo "intValue = "is_null($intValue), "\n";