PageRenderTime 44ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/hphp/test/slow/ext_array/array_search.php

http://github.com/facebook/hiphop-php
PHP | 15 lines | 12 code | 3 blank | 0 comment | 0 complexity | dc7c6267b923da0cb56650abac4620ae 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. <<__EntryPoint>>
  3. function main_array_search() {
  4. $array = darray[
  5. 0 => "blue",
  6. 1 => "red",
  7. 2 => "green",
  8. 3 => "red"
  9. ];
  10. var_dump(array_search("green", $array));
  11. var_dump(array_search("red", $array));
  12. }