Skip to content

Close PHP tags in tests #12422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Zend/tests/bug54547.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
<?php
if (PHP_INT_MAX !== 9223372036854775807)
die("skip for 64-bit long systems only");
?>
--FILE--
<?php
var_dump("9223372036854775807" == "9223372036854775808");
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug61011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ try {
}
}
echo 'okey';
?>
--EXPECT--
okey
1 change: 1 addition & 0 deletions Zend/tests/bug62097.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Bug #62097: fix for bug #54547 is wrong for 32-bit machines
<?php
if (PHP_INT_MAX !== 2147483647)
die('skip for system with 32-bit wide longs only');
?>
--FILE--
<?php
var_dump("02147483647" == "2147483647",
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/bug62907.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ class C extends B {
}
}
echo "okey";
?>
--EXPECT--
okey
1 change: 1 addition & 0 deletions Zend/tests/bug64660.phpt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Zend/tests/bug65969.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Bug #65969 (Chain assignment with T_LIST failure)
$obj = new stdClass;
list($a,$b) = $obj->prop = [1,2];
var_dump($a,$b);
?>
--EXPECT--
int(1)
int(2)
1 change: 1 addition & 0 deletions Zend/tests/bug78454_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ Invalid consecutive numeric separators after hex literal
--FILE--
<?php
0x0__F;
?>
--EXPECTF--
Parse error: syntax error, unexpected identifier "__F" in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/bug78454_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ Invalid consecutive numeric separators after binary literal
--FILE--
<?php
0b0__1
?>
--EXPECTF--
Parse error: syntax error, unexpected identifier "__1" in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/flexible-heredoc-error7.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Note: the closing ?> has been deliberately elided.

echo <<<END

?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

--EXPECTF--
Parse error: syntax error, unexpected end of file, expecting variable or heredoc end or "${" or "{$" in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/flexible-nowdoc-error7.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Note: the closing ?> has been deliberately elided.

echo <<<'END'

?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is incorrect as per the description.

--EXPECTF--
Parse error: syntax error, unexpected end of file, expecting variable or heredoc end or "${" or "{$" in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/generators/gh9801.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ function a() {
}

foreach(a() as $v);
?>
--EXPECTF--
Fatal error: Allowed memory size of %d bytes exhausted %s
1 change: 1 addition & 0 deletions Zend/tests/lsb_023.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ A::out();
B::out();
C::out();
echo PHP_EOL;
?>
--EXPECT--
A
B
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/lsb_024.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class C extends A {
A::out();
B::out();
C::out();
?>
--EXPECT--
A
B
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/ns_063.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ class Bar {
}
new Bar();
echo "ok\n";
?>
--EXPECT--
ok
1 change: 1 addition & 0 deletions Zend/tests/stack_limit/stack_limit_005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ $test
->f()->f()->f()->f()->f()->f()->f()->f()->f()->f()
;

?>
--EXPECTF--
Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/stack_limit/stack_limit_013.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,6 @@ $test = [
1
];

?>
--EXPECTF--
Fatal error: Maximum call stack size of %d bytes reached during compilation. Try splitting expression in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/unterminated_comment.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Unterminated comment
<?php
/* Foo
Bar
?>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks intentional.

--EXPECTF--
Parse error: Unterminated comment starting line 2 in %s on line %d
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ gc_collect_cycles();

var_dump($map);

?>
--EXPECTF--
object(WeakMap)#%d (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-002.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ gc_collect_cycles();

var_dump($map);

?>
--EXPECTF--
object(WeakMap)#%d (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gc_collect_cycles();

var_dump($ref->get());

?>
--EXPECTF--
object(WeakMap)#%d (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-004.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gc_collect_cycles();

var_dump($ref->get());

?>
--EXPECTF--
object(WeakMap)#%d (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-005.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ gc_collect_cycles();

var_dump($map);

?>
--EXPECTF--
object(WeakMap)#%d (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-006.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ gc_collect_cycles();

var_dump($map2);

?>
--EXPECT--
object(WeakMap)#1 (1) {
[0]=>
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-007.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ unset($container, $canary);
gc_collect_cycles();
echo 2;

?>
--EXPECT--
1container
canary
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-008.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ unset($canary);
gc_collect_cycles();
echo 2;

?>
--EXPECT--
1canary
2
1 change: 1 addition & 0 deletions Zend/tests/weakrefs/gh10043-011.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ gc_collect_cycles();

var_dump($m);

?>
--EXPECT--
object(WeakMap)#1 (0) {
}
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/gh11876.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var_dump(zend_test_zend_ini_parse_quantity('0g10'));
var_dump(zend_test_zend_ini_parse_quantity('0m10'));
var_dump(zend_test_zend_ini_parse_quantity('0k10'));

?>
--EXPECTF--
Warning: Invalid quantity "0x0x12": no digits after base prefix, interpreting as "0" for backwards compatibility in %s on line %d
int(0)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/zend_ini_parse_quantity.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ foreach (['', ' '] as $leadingWS) {
}
}
}
?>
--EXPECT--
# "1"
int(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ foreach (['', ' '] as $leadingWS) {
}
}
}
?>
--EXPECT--
# "0b11"
int(3)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/zend_ini_parse_quantity_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ foreach ($tests as $setting) {
var_dump(zend_test_zend_ini_parse_quantity($setting));
print "\n";
}
?>
--EXPECTF--
# "K"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ foreach (['', ' '] as $leadingWS) {
}
}
}
?>
--EXPECT--
# "0x1F"
int(31)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ zend_test

var_dump(ini_set("zend_test.quantity_value", "1MB"));
var_dump(ini_get("zend_test.quantity_value"));
?>
--EXPECTF--
Warning: Invalid "zend_test.quantity_value" setting. Invalid quantity "1MB": unknown multiplier "B", interpreting as "1" for backwards compatibility in %s on line %d
string(1) "0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ zend_test.quantity_value=1MB
<?php

var_dump(ini_get("zend_test.quantity_value"));
?>
--EXPECTF--
Warning: Invalid "zend_test.quantity_value" setting. Invalid quantity "1MB": unknown multiplier "B", interpreting as "1" for backwards compatibility in %s on line %d
string(3) "1MB"
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ foreach (['', ' '] as $leadingWS) {
}
}
}
?>
--EXPECT--
# "0o14"
int(12)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/zend_ini_parse_quantity_overflow.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ foreach ($tests as $name => $value) {
print "----------\n";
}

?>
--EXPECTF--
# No overflow 001: "0"
0
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/zend_ini_parse_quantity_zero.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ foreach ($tests as $setting) {
var_dump(zend_test_zend_ini_parse_quantity($setting));
print "\n";
}
?>
--EXPECT--
# "0"
int(0)
Expand Down
1 change: 1 addition & 0 deletions Zend/tests/zend_ini/zend_ini_parse_uquantity_overflow.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ foreach ($tests as $name => $value) {
printf("# zend_test_zend_ini_parse_uquantity(\"-1\") === -1\n");
var_dump(zend_test_zend_ini_parse_uquantity("-1") === -1);

?>
--EXPECTF--
# No overflow 001: "0"
0
Expand Down
1 change: 1 addition & 0 deletions ext/curl/tests/curl_file_upload_stream.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ curl
--SKIPIF--
<?php
if (curl_version()['version_number'] < 0x73800) die('skip requires curl >= 7.56.0');
?>
--FILE--
<?php
include 'server.inc';
Expand Down
1 change: 1 addition & 0 deletions ext/dom/tests/DOMNode_removeChild_error1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ try {
} catch (DOMException $e) {
echo "DOMException: " . $e->getMessage();
}
?>
--EXPECT--
DOMException: Not Found Error
1 change: 1 addition & 0 deletions ext/dom/tests/DOMNode_replaceChild_error1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ try {
} catch (DOMException $e) {
echo "DOMException: " . $e->getMessage();
}
?>
--EXPECT--
DOMException: Not Found Error
1 change: 1 addition & 0 deletions ext/dom/tests/DOMNode_replaceChild_error2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ try {
} catch (DOMException $e) {
echo "DOMException: " . $e->getMessage();
}
?>
--EXPECT--
DOMException: Hierarchy Request Error
1 change: 1 addition & 0 deletions ext/dom/tests/bug80600.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ $doc = new \DOMDocument();
$doc->loadXML('<a><!-- foo --></a>');
$doc->documentElement->firstChild->remove();
echo $doc->saveXML($doc->documentElement);
?>
--EXPECT--
<a/>
1 change: 1 addition & 0 deletions ext/ffi/tests/gh10403.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ foreach ($test_values as $test_value) {
var_dump($test_struct->y === $test_value);
}
var_dump($test_struct->x);
?>
--EXPECT--
bool(true)
bool(true)
Expand Down
1 change: 1 addition & 0 deletions ext/ftp/tests/dead-resource.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ try {
} catch (ValueError $ex) {
echo "Exception: ", $ex->getMessage(), "\n";
}
?>
--EXPECT--
bool(true)
bool(true)
Expand Down
1 change: 1 addition & 0 deletions ext/ftp/tests/ftp_constructor.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ try {
} catch (Error $ex) {
echo "Exception: ", $ex->getMessage(), "\n";
}
?>
--EXPECT--
Exception: Cannot directly construct FTP\Connection, use ftp_connect() or ftp_ssl_connect() instead
1 change: 1 addition & 0 deletions ext/ftp/tests/ftp_set_option_errors.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ foreach ($options as $option) try {
echo "Exception: ", $ex->getMessage(), "\n";
}

?>
--EXPECT--
Exception: ftp_set_option(): Argument #3 ($value) must be greater than 0 for the FTP_TIMEOUT_SEC option
Exception: ftp_set_option(): Argument #3 ($value) must be of type int for the FTP_TIMEOUT_SEC option, string given
Expand Down
1 change: 1 addition & 0 deletions ext/ftp/tests/ftp_ssl_connect_error.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ try {
}

echo "===DONE===\n";
?>
--EXPECTF--
*** Testing ftp_ssl_connect() function : error conditions ***

Expand Down
1 change: 1 addition & 0 deletions ext/gettext/tests/gettext_dcgettext.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gettext
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
die("skip en_US.UTF-8 locale not supported.");
}
?>
--FILE--
<?php
chdir(__DIR__);
Expand Down
1 change: 1 addition & 0 deletions ext/gettext/tests/gettext_dgettext.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gettext
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
die("SKIP en_US.UTF-8 locale not supported.");
}
?>
--FILE--
<?php
chdir(__DIR__);
Expand Down
1 change: 1 addition & 0 deletions ext/gettext/tests/gettext_dngettext-plural.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ gettext
if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
die("skip en_US.UTF-8 locale not supported.");
}
?>
--FILE--
<?php
chdir(__DIR__);
Expand Down
1 change: 1 addition & 0 deletions ext/imap/tests/imap_constructor.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ try {
} catch (Error $ex) {
echo "Exception: ", $ex->getMessage(), "\n";
}
?>
--EXPECT--
Exception: Cannot directly construct IMAP\Connection, use imap_open() instead
1 change: 1 addition & 0 deletions ext/imap/tests/imap_final.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ imap
<?php

class T extends IMAP\Connection {}
?>
--EXPECTF--
Fatal error: Class T cannot extend final class IMAP\Connection in %s on line %d
1 change: 1 addition & 0 deletions ext/intl/tests/breakiter_preceding_basic2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ intl
--SKIPIF--
<?php
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
?>
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
Expand Down
Loading