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

/trunk/Examples/test-suite/php/director_thread_runme.php

#
PHP | 29 lines | 19 code | 7 blank | 3 comment | 1 complexity | 63d249dfc74313d0d1eb4f789bdb9102 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. <?php
  2. require "tests.php";
  3. require "director_thread.php";
  4. // No new functions
  5. check::functions(array(millisecondsleep,foo_stop,foo_run,foo_do_foo));
  6. // No new classes
  7. check::classes(array(director_thread,Foo));
  8. // now new vars
  9. check::globals(array(foo_val));
  10. class Derived extends Foo {
  11. function do_foo() {
  12. $this->val = $this->val - 1;
  13. }
  14. }
  15. $d = new Derived();
  16. $d->run();
  17. if ($d->val >= 0) {
  18. check::fail($d->val);
  19. }
  20. $d->stop();
  21. check::done();
  22. ?>