TestAllProperty.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * @CreateTime: 2019/12/7 下午10:59
  4. * @Author: huizhang <tuzisir@163.com>
  5. * @Copyright: copyright(2019) Easyswoole all rights reserved
  6. * @Description: 兼容php7.4约束类型单测
  7. */
  8. namespace EasySwoole\Spl\Test\Bean;
  9. use EasySwoole\Spl\SplBean;
  10. class TestAllProperty extends SplBean{
  11. // static
  12. public static $staticA;
  13. protected static $staticB;
  14. private static $staticC;
  15. // static赋初值
  16. public static $staticInitA='';
  17. protected static $staticInitB='';
  18. private static $staticInitC='';
  19. // 普通
  20. public $a;
  21. protected $b;
  22. private $c;
  23. // 普通赋初值
  24. public $aInit='';
  25. protected $bInit='';
  26. private $cInit='';
  27. }
  28. class TestAllProperty74 extends SplBean{
  29. // static
  30. public static $staticA;
  31. protected static $staticB;
  32. private static $staticC;
  33. // static赋初值
  34. public static $staticInitA='';
  35. protected static $staticInitB='';
  36. private static $staticInitC='';
  37. // 普通
  38. public $a;
  39. protected $b;
  40. private $c;
  41. // 普通赋初值
  42. public $aInit='';
  43. protected $bInit='';
  44. private $cInit='';
  45. // 约束类型
  46. public string $typeA;
  47. protected int $typeB;
  48. private bool $typeC;
  49. // 约束类型赋初值
  50. public string $typeInitA='';
  51. protected int $typeInitB=1;
  52. private bool $typeInitC=true;
  53. }