PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms 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
 1<?php
 2
 3require "tests.php";
 4require "director_thread.php";
 5
 6// No new functions
 7check::functions(array(millisecondsleep,foo_stop,foo_run,foo_do_foo));
 8// No new classes
 9check::classes(array(director_thread,Foo));
10// now new vars
11check::globals(array(foo_val));
12
13class Derived extends Foo {
14  function do_foo() {
15    $this->val = $this->val - 1;
16  }
17}
18
19$d = new Derived();
20$d->run();
21
22if ($d->val >= 0) {
23  check::fail($d->val);
24}
25
26$d->stop();
27
28check::done();
29?>