Skip to content

Commit 7aacc70

Browse files
committed
Add many missing closing PHP tags to tests
Closes GH-5958
1 parent 05478e9 commit 7aacc70

File tree

1,103 files changed

+1097
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,103 files changed

+1097
-30
lines changed

Zend/tests/022.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Ext extends Base
1919
$a = new Ext();
2020
$a->someMethod("foo");
2121
$a->someMethod();
22+
?>
2223
--EXPECT--
2324
foo
2425
default

Zend/tests/anon/001.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ declare bare anonymous class
33
--FILE--
44
<?php
55
var_dump(new class{});
6+
?>
67
--EXPECTF--
78
object(class@%s)#%d (0) {
89
}

Zend/tests/anon/002.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ $a = new class extends A implements B {
1515
};
1616

1717
var_dump($a instanceof A, $a instanceof B);
18+
?>
1819
--EXPECT--
1920
bool(true)
2021
bool(true)

Zend/tests/anon/003.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ while (@$i++<10) {
1010
}
1111
});
1212
}
13+
?>
1314
--EXPECTF--
1415
object(class@%s)#1 (1) {
1516
["i"]=>

Zend/tests/anon/004.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ $outer = new Outer(array(
2626

2727
/* not null because inheritance */
2828
var_dump($outer->getArrayAccess()[0]);
29+
?>
2930
--EXPECTF--
3031
int(%d)

Zend/tests/anon/005.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,6 @@ $proxy = $outer->getArrayAccess();
3232

3333
/* null because no inheritance, so no access to protected member */
3434
var_dump(@$outer->getArrayAccess()[0]);
35+
?>
3536
--EXPECT--
3637
NULL

Zend/tests/anon/006.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace lone {
99
namespace {
1010
var_dump ($hello);
1111
}
12+
?>
1213
--EXPECTF--
1314
object(class@%s)#1 (0) {
1415
}

Zend/tests/anon/007.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ namespace lone {
1717

1818
new Outer();
1919
}
20+
?>
2021
--EXPECTF--
2122
object(class@%s)#2 (0) {
2223
}

Zend/tests/anon/008.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $anonClass = new class("cats", "dogs") {
1818

1919
var_dump($anonClass::$foo);
2020
var_dump($anonClass::getBar());
21+
?>
2122
--EXPECT--
2223
string(4) "cats"
2324
string(4) "dogs"

Zend/tests/anon/009.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ $anonClass = new class {
1414
};
1515

1616
var_dump($anonClass->someMethod());
17+
?>
1718
--EXPECT--
1819
string(3) "bar"

Zend/tests/array_unpack/basic.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ var_dump([...new ArrayIterator(['a', 'b', 'c'])]);
2424
var_dump([0, ...$array, ...getArr(), 6, 7, 8, 9, 10, ...arrGen()]);
2525
var_dump([0, ...$array, ...$array, 'end']);
2626

27+
?>
2728
--EXPECT--
2829
array(0) {
2930
}

Zend/tests/array_unpack/classes.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ try {
2222
} catch (Error $ex) {
2323
echo "Exception: " . $ex->getMessage() . "\n";
2424
}
25+
?>
2526
--EXPECT--
2627
array(5) {
2728
[0]=>

Zend/tests/array_unpack/non_integer_keys.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ try {
1313
echo "Exception: " . $ex->getMessage() . "\n";
1414
}
1515

16+
?>
1617
--EXPECT--
1718
Exception: Cannot unpack Traversable with non-integer keys

Zend/tests/array_unpack/ref1.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ unset($a); //array (0 => (refcount=1, is_ref=1)=1)
1010

1111
var_dump([...$b]); //array (0 => (refcount=0, is_ref=0)=1)
1212

13+
?>
1314
--EXPECT--
1415
array(1) {
1516
[0]=>

Zend/tests/array_unpack/string_keys.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ try {
1616
var_dump($ex->getMessage());
1717
}
1818

19+
?>
1920
--EXPECT--
2021
string(36) "Cannot unpack array with string keys"
2122
string(42) "Cannot unpack Traversable with string keys"

Zend/tests/array_unpack/undef_var.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ array unpacking with undefinded variable
55

66
var_dump([...$arr]);
77

8+
?>
89
--EXPECTF--
910
Warning: Undefined variable $arr in %s on line %d
1011

Zend/tests/ast/zend-pow-assign.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ assert.exception=0
88

99
assert_options(ASSERT_WARNING);
1010
assert(false && ($a **= 2));
11+
?>
1112
--EXPECTF--
1213
Warning: assert(): assert(false && ($a **= 2)) failed in %s%ezend-pow-assign.php on line %d

Zend/tests/ast_serialize_backtick_literal.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ assert.exception=0
88

99
assert_options(ASSERT_WARNING);
1010
assert(false && `echo -n ""`);
11+
?>
1112
--EXPECTF--
1213
Warning: assert(): assert(false && `echo -n ""`) failed in %s%east_serialize_backtick_literal.php on line %d

Zend/tests/attributes/007_self_reflect_attribute.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ foreach ($attributes as $attribute) {
1414
var_dump(get_class($a));
1515
var_dump($a->flags == Attribute::TARGET_ALL);
1616
}
17+
?>
1718
--EXPECT--
1819
string(9) "Attribute"
1920
array(0) {

Zend/tests/attributes/008_wrong_attribution.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Attributes: Prevent Attribute on non classes
55

66
@@Attribute
77
function foo() {}
8+
?>
89
--EXPECTF--
910
Fatal error: Attribute "Attribute" cannot target function (allowed targets: class) in %s

Zend/tests/attributes/016_custom_attribute_validation.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ if (!extension_loaded('zend-test')) {
1111
@@ZendTestAttribute
1212
function foo() {
1313
}
14+
?>
1415
--EXPECTF--
1516
Fatal error: Only classes can be marked with @@ZendTestAttribute in %s

Zend/tests/binary-32bit.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ var_dump(-0b11111111111111111111111111111111);
7777
var_dump(-0b1111111111111111111111111111111);
7878
var_dump(-0b111111111111111111111111111111);
7979
var_dump(-0b1);
80+
?>
8081
--EXPECT--
8182
int(1)
8283
int(3)

Zend/tests/binary.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ var_dump(-0b1111111111111111111111111111111111111111111111111111111111111111);
7979
var_dump(-0b111111111111111111111111111111111111111111111111111111111111111);
8080
var_dump(-0b11111111111111111111111111111111111111111111111111111111111111);
8181
var_dump(-0b1);
82+
?>
8283
--EXPECT--
8384
int(1)
8485
int(3)

Zend/tests/bug31177-2.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ try {
1313
} catch (Exception $e) {
1414
var_dump($x);
1515
}
16+
?>
1617
--EXPECT--
1718
object(foo)#1 (0) {
1819
}

Zend/tests/bug37251.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ try {
1313
} catch (Error $e) {
1414
echo 'OK';
1515
}
16+
?>
1617
--EXPECT--
1718
OK

Zend/tests/bug37715.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ foreach($a as $k => $d)
2424
}
2525
// Alternatively $c = $a; and foreachloop removal will cause identical results.
2626
var_dump(key($a['b']));
27+
?>
2728
--EXPECT--
2829
int(3)
2930
int(3)

Zend/tests/bug38772.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ $a = new A();
3535
$b = new B();
3636
$c = new C();
3737
$d = new D();
38+
?>
3839
--EXPECT--
3940
A::foo
4041
A::foo

Zend/tests/bug40509.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ foreach ($arr["v"] as $k => $v) {
1919
var_dump($k);
2020
}
2121
var_dump(key($arr["v"]));
22+
?>
2223
--EXPECT--
2324
int(0)
2425
int(0)

Zend/tests/bug40705.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ foreach ($foo as $k => $v) {
1717
var_dump($k);
1818
}
1919
var_dump(key($foo));
20+
?>
2021
--EXPECT--
2122
int(0)
2223
int(0)

Zend/tests/bug41401.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Bug #41401 (wrong precedence for unary minus)
55
echo 1/-2*5;
66
echo "\n";
77
echo 6/+2*-3;
8+
?>
89
--EXPECT--
910
-2.5
1011
-9

Zend/tests/bug41640.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class foo {
88
}
99

1010
var_dump(get_class_vars("foo"));
11+
?>
1112
--EXPECT--
1213
array(1) {
1314
["x"]=>

Zend/tests/bug42211.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $a = new A();
2020
$a->foo();
2121
$b = new B();
2222
$b->foo();
23+
?>
2324
--EXPECT--
2425
bool(true)
2526
bool(true)

Zend/tests/bug42798.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ function foo($c = ok::constant) {
1111
}
1212

1313
foo();
14+
?>
1415
--EXPECT--
1516
ok

Zend/tests/bug42802.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ test2($x);
3131
test3($x);
3232
test4($y);
3333
test5($x);
34+
?>
3435
--EXPECTF--
3536
ok
3637
ok

Zend/tests/bug42820.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var_dump(defined('\\ns\\foo::ok'));
1717
var_dump(defined('\\ns\\foo::bug'));
1818
var_dump(defined('ns\\bar::bug'));
1919
var_dump(defined('\\ns\\bar::bug'));
20+
?>
2021
--EXPECT--
2122
bool(true)
2223
bool(false)

Zend/tests/bug43183.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ class Foo {}
88
class Bar {}
99
use Test\Bar;
1010
echo "ok\n";
11+
?>
1112
--EXPECT--
1213
ok

Zend/tests/bug43332_1.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class foo {
1111
$foo = new foo;
1212
$foo->bar($foo); // Ok!
1313
$foo->bar(new \stdclass); // Error, ok!
14+
?>
1415
--EXPECTF--
1516
Fatal error: Uncaught TypeError: foobar\foo::bar(): Argument #1 ($a) must be of type foobar\foo, stdClass given, called in %s:%d
1617
Stack trace:

Zend/tests/bug43332_2.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ class foo {
1111
$foo = new foo;
1212
$foo->bar($foo); // Ok!
1313
$foo->bar(new stdclass); // Error, ok!
14+
?>
1415
--EXPECTF--
1516
Fatal error: '\self' is an invalid class name in %sbug43332_2.php on line 5

Zend/tests/bug43651.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var_dump(is_callable("Test::foo"));
2222
var_dump(is_callable("\\Test::foo"));
2323
var_dump(is_callable("is_string"));
2424
var_dump(is_callable("\\is_string"));
25+
?>
2526
--EXPECT--
2627
bool(false)
2728
bool(false)

Zend/tests/bug44141.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class Y extends X
2121

2222
$y = Y::cheat(5);
2323
echo $y->x, PHP_EOL;
24+
?>
2425
--EXPECTF--
2526
Fatal error: Uncaught Error: Call to private X::__construct() from scope Y in %s:%d
2627
Stack trace:

Zend/tests/bug45744.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class Bar2 extends Foo2 {
3333
}
3434

3535
new Bar2(array());
36+
?>
3637
--EXPECT--
3738
array(0) {
3839
}

Zend/tests/bug49866.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ $a = "string";
66
$b = &$a[1];
77
$b = "f";
88
echo $a;
9+
?>
910
--EXPECTF--
1011
Fatal error: Uncaught Error: Cannot create references to/from string offsets in %sbug49866.php:3
1112
Stack trace:

Zend/tests/bug50394.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ $proxy = new Proxy;
1717
call_user_func_array( array( $proxy, 'bar' ), $args );
1818
call_user_func_array( array( $proxy, 'bar' ), array(&$arg) );
1919
var_dump($arg);
20+
?>
2021
--EXPECT--
2122
bar called!
2223
bar called!

Zend/tests/bug50816.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var_dump($mapWithoutConst0[1]);
3535
var_dump($mapWithoutConst1[1]);
3636
var_dump($mapWithoutConst2[1]);
3737
var_dump($mapWithoutConst3[1]);
38+
?>
3839
--EXPECT--
3940
string(3) "two"
4041
string(3) "two"

Zend/tests/bug51394.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function eh()
1212

1313
set_error_handler("eh");
1414
$a = $empty($b);
15+
?>
1516
--EXPECTF--
1617
Fatal error: Uncaught Exception: error! in %sbug51394.php:%d
1718
Stack trace:

Zend/tests/bug52614.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ $foo->f1()[0]++;
6969
var_dump($foo->a1[0]);
7070
$foo->f6()[0]++;
7171
var_dump($foo->a1[0]);
72+
?>
7273
--EXPECT--
7374
NULL
7475
array(0) {

Zend/tests/bug52879.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ $myGlobal=new MyClass();
1212
$myGlobal->myRef=&$myGlobal;
1313
$myGlobal->myNonExistentProperty="ok\n";
1414
echo $myGlobal;
15+
?>
1516
--EXPECT--
1617
ok

Zend/tests/bug53511.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function test() {
1919

2020
test();
2121
echo "bug\n";
22+
?>
2223
--EXPECTF--
2324
Fatal error: Uncaught Exception: ops 1 in %sbug53511.php:4
2425
Stack trace:

Zend/tests/bug53727.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ echo (defined('ChildClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";
1515

1616
echo (is_subclass_of('ParentClass', 'MyInterface') ? 'true' : 'false') . "\n";
1717
echo (defined('ParentClass::TEST_CONSTANT') ? 'true' : 'false') . "\n";
18+
?>
1819
--EXPECT--
1920
true
2021
true

Zend/tests/bug54039.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function test_3() {
4141
}
4242
$f = test_3(); $f();
4343
$f = test_3(); $f();
44+
?>
4445
--EXPECT--
4546
Outer function increments $v to 1
4647
Inner function reckons $v is 1

Zend/tests/bug54268.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ class Test
3131
}
3232
$x = new Test();
3333
Test::$mystatic = new DestructorCreator();
34+
?>
3435
--EXPECTF--
3536
Fatal error: Allowed memory size of %s bytes exhausted%s(tried to allocate %s bytes) in %s on line %d

0 commit comments

Comments
 (0)