aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/php/newobject2_runme.php
blob: f20a6a4f94d79a438c5894d1b0d8ef72ebb21959 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

require "tests.php";

check::equal(fooCount(), 0, "no Foo objects expected");
$foo = makeFoo();
check::equal(get_class($foo), "Foo", "static failed");
check::equal(fooCount(), 1, "1 Foo object expected");
$bar = makeFoo();
check::equal(get_class($bar), "Foo", "regular failed");
check::equal(fooCount(), 2, "2 Foo objects expected");
$foo = null;
check::equal(fooCount(), 1, "1 Foo object expected");
$bar = null;
check::equal(fooCount(), 0, "no Foo objects expected");

check::done();