test.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace loyalsoft;
  3. include __DIR__ . '/main.php';
  4. echoLine("phpver: " . PHP_VERSION . PHP_EOL);
  5. //SelfChecker::CheckAll();
  6. //
  7. //set_time_limit(15); # 设置执行超时时间
  8. //
  9. //
  10. echo number_format(1.0125, 2, '.', '');
  11. //$arr = GameConfig::plot_getItem(1001, 0); # 查找对应的剧情
  12. //var_dump($arr);
  13. //foreach ($arr as $plot) {
  14. // isEditor() and $plot = new \sm_plot();
  15. // var_dump($plot);
  16. //}
  17. $i = 9;
  18. var_dump($i++);
  19. var_dump($i);
  20. $user = ObjectInit();
  21. $user->name = "wg";
  22. class A {
  23. public $B = "王刚";
  24. function &B() {
  25. echoLine(__FUNCTION__);
  26. echoLine(__METHOD__);
  27. $name = __FUNCTION__;
  28. echoLine($this->$name);
  29. echoLine(nameof($this->B));
  30. return $this->B;
  31. }
  32. }
  33. $tabName = 'tab_guild';
  34. $ret = GuildProc::getMemUserGuildInfo("gw", 1);
  35. $keywords = "青";
  36. $sqlret = daoInst()->select()->from($tabName)
  37. ->where("`zoneid`=$zoneid and (`guildId`='$keywords' OR `name` like '%$keywords%')")
  38. ->limit(10)->fetchAll();
  39. //var_dump($sqlret);
  40. $startIndex = 8;
  41. $dbret = daoInst()->select()->from(GuildProc::tabGuild)
  42. ->where('zoneid')->eq($zoneid)
  43. ->limit("$startIndex ,20")
  44. ->fetchAll();
  45. var_dump($dbret);
  46. //Err(1005);
  47. //var_dump(Resp::err(3503, "时尚杂志opencv"));