Constants.php 994 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * This file is part of workerman.
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the MIT-LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @author walkor<walkor@workerman.net>
  10. * @copyright walkor<walkor@workerman.net>
  11. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  12. *
  13. * @link http://www.workerman.net/
  14. */
  15. // Display errors.
  16. ini_set('display_errors', 'on');
  17. // Reporting all.
  18. error_reporting(E_ALL);
  19. // JIT is not stable, temporarily disabled.
  20. ini_set('pcre.jit', 0);
  21. // Reset opcache.
  22. if (function_exists('opcache_reset')) {
  23. opcache_reset();
  24. }
  25. // For onError callback.
  26. const WORKERMAN_CONNECT_FAIL = 1;
  27. // For onError callback.
  28. const WORKERMAN_SEND_FAIL = 2;
  29. // Define OS Type
  30. const OS_TYPE_LINUX = 'linux';
  31. const OS_TYPE_WINDOWS = 'windows';
  32. // Compatible with php7
  33. if ( ! class_exists('Error')) {
  34. class Error extends Exception
  35. {
  36. }
  37. }