PageRenderTime 36ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/hphp/test/slow/uniqid-long-prefix.php

https://github.com/xstudio/hhvm
PHP | 6 lines | 6 code | 0 blank | 0 comment | 1 complexity | 83b6d95fcadb8f169e4086d11e177cfd MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, BSD-3-Clause, LGPL-2.0, LGPL-2.1
  1. <?php
  2. $prefix = str_repeat('0!1@2#3$4%5^6&7*', 17); // 272 characters
  3. $id = uniqid($prefix, true);
  4. var_dump(strlen($id) > 272);
  5. var_dump(strncmp($prefix, $id, strlen($prefix)) == 0);
  6. var_dump(strpos($prefix, substr($id, strlen($prefix))) === false);