PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/dict/dict-unset.php

http://github.com/facebook/hiphop-php
PHP | 17 lines | 14 code | 3 blank | 0 comment | 0 complexity | 5932f0cb3127de8f50fa09e2258f0aa7 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
  1. <?hh
  2. function main() {
  3. $e = dict[];
  4. $one = dict[1 => "bar"];
  5. $two = dict[1 => "apple", "1" => "orange"];
  6. $e[1] = "red";
  7. $e["1"] = "green";
  8. $one["1"] = "foo";
  9. unset($e[1]);
  10. unset($one[1]);
  11. unset($two["1"]);
  12. var_dump($e, $one, $two);
  13. }
  14. main();