Sync leading and final newlines in *.phpt sections

This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
This commit is contained in:
Peter Kokot 2018-10-15 04:33:09 +02:00
parent e84662c35c
commit d679f02295
3401 changed files with 1530 additions and 4009 deletions

View file

@ -17,7 +17,6 @@ $arr[][]->bar = 2;
?> ?>
--EXPECTF-- --EXPECTF--
Notice: Undefined variable: arr in %s on line %d Notice: Undefined variable: arr in %s on line %d
Notice: Undefined variable: arr in %s on line %d Notice: Undefined variable: arr in %s on line %d

View file

@ -9,5 +9,4 @@ abstract class TestClass
?> ?>
===DONE=== ===DONE===
--EXPECT-- --EXPECT--
===DONE=== ===DONE===

View file

@ -38,7 +38,6 @@ var_dump($c);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECTF--
Warning: A non-numeric value encountered in %s on line %d Warning: A non-numeric value encountered in %s on line %d
int(75636) int(75636)

View file

@ -19,7 +19,6 @@ var_dump($c);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECTF--
Warning: A non-numeric value encountered in %s on line %d Warning: A non-numeric value encountered in %s on line %d
Exception: Unsupported operand types Exception: Unsupported operand types

View file

@ -6,5 +6,3 @@ var_dump(new class{});
--EXPECTF-- --EXPECTF--
object(class@%s)#%d (0) { object(class@%s)#%d (0) {
} }

View file

@ -18,4 +18,3 @@ var_dump($a instanceof A, $a instanceof B);
--EXPECT-- --EXPECT--
bool(true) bool(true)
bool(true) bool(true)

View file

@ -51,4 +51,3 @@ object(class@%s)#1 (1) {
["i"]=> ["i"]=>
int(10) int(10)
} }

View file

@ -12,4 +12,3 @@ namespace {
--EXPECTF-- --EXPECTF--
object(class@%s)#1 (0) { object(class@%s)#1 (0) {
} }

View file

@ -20,4 +20,3 @@ namespace lone {
--EXPECTF-- --EXPECTF--
object(class@%s)#2 (0) { object(class@%s)#2 (0) {
} }

View file

@ -16,4 +16,3 @@ array(1) {
["public"]=> ["public"]=>
string(6) "public" string(6) "public"
} }

View file

@ -25,4 +25,3 @@ GenerateError2("Test2");
#0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11] #0 userErrorHandler(8, Undefined variable: b, %sbug29896.php, 11, Array ([A1] => Test1)) called at [%sbug29896.php:11]
#1 GenerateError1(Test1) called at [%sbug29896.php:16] #1 GenerateError1(Test1) called at [%sbug29896.php:16]
#2 GenerateError2(Test2) called at [%sbug29896.php:19] #2 GenerateError2(Test2) called at [%sbug29896.php:19]

View file

@ -13,4 +13,3 @@ switch ($a) {
?> ?>
--EXPECT-- --EXPECT--
ok ok

View file

@ -7,4 +7,3 @@ class test implements a {
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Interface 'a' not found in %sbug30519.php on line 2 Fatal error: Interface 'a' not found in %sbug30519.php on line 2

View file

@ -24,4 +24,3 @@ echo "this is still executed\n";
BUG BUG
please fix this thing, it wasted a nice part of my life! please fix this thing, it wasted a nice part of my life!
this is still executed this is still executed

View file

@ -18,4 +18,3 @@ echo "$a\n";
?> ?>
--EXPECT-- --EXPECT--
ok ok

View file

@ -21,4 +21,3 @@ try {
((( (((
here here
))) )))

View file

@ -36,4 +36,3 @@ Stack trace:
#0 %s(%d): XmlTest->run() #0 %s(%d): XmlTest->run()
#1 {main} #1 {main}
thrown in %sbug34064.php on line 18 thrown in %sbug34064.php on line 18

View file

@ -15,4 +15,3 @@ if(!$kids) echo "ok\n"; else echo "bug\n";
bool(false) bool(false)
ok ok
ok ok

View file

@ -18,4 +18,3 @@ stch::g ();
EHLO EHLO
EHLO EHLO
EHLO EHLO

View file

@ -13,4 +13,3 @@ echo "NO LEAK\n";
--EXPECT-- --EXPECT--
clonned clonned
NO LEAK NO LEAK

View file

@ -35,4 +35,3 @@ bool(false)
bool(true) bool(true)
bool(true) bool(true)
bool(false) bool(false)

View file

@ -9,4 +9,3 @@ Fatal error: Uncaught Error: __clone method called on non-object in %sbug42818.p
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %sbug42818.php on line 2 thrown in %sbug42818.php on line 2

View file

@ -28,4 +28,3 @@ bool(true)
bool(false) bool(false)
bool(false) bool(false)
bool(false) bool(false)

View file

@ -48,4 +48,3 @@ Class [ <user> class x extends c implements a, b ] {
} }
} }
} }

View file

@ -28,7 +28,6 @@ $child->test();
?> ?>
--EXPECT-- --EXPECT--
From parent scope From parent scope
array(1) { array(1) {
["prot"]=> ["prot"]=>

View file

@ -10,4 +10,3 @@ var_dump(ini_get("arg_separator.output"));
--EXPECT-- --EXPECT--
bool(false) bool(false)
string(1) "&" string(1) "&"

View file

@ -8,4 +8,3 @@ $a->{"a"."b"};
Notice: Undefined variable: a in %sbug47109.php on line 2 Notice: Undefined variable: a in %sbug47109.php on line 2
Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2 Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2

View file

@ -23,7 +23,6 @@ $l_aa=new aa();
$l_aa->dosome(); $l_aa->dosome();
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Uncaught Exception in %s Fatal error: Uncaught Exception in %s
Stack trace: Stack trace:
#0 %s(%d): do_throw() #0 %s(%d): do_throw()

View file

@ -22,7 +22,6 @@ catch(Exception $e){
} }
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Uncaught Exception in %s Fatal error: Uncaught Exception in %s
Stack trace: Stack trace:
#0 %s(%d): C->generate(0) #0 %s(%d): C->generate(0)

View file

@ -21,4 +21,3 @@ var_dump($arg);
bar called! bar called!
bar called! bar called!
int(3) int(3)

View file

@ -7,6 +7,5 @@ preg_match('//', '', $data->info);
var_dump($data); var_dump($data);
?> ?>
--EXPECTF-- --EXPECTF--
Warning: Attempt to modify property 'info' of non-object in %sbug52237.php on line 3 Warning: Attempt to modify property 'info' of non-object in %sbug52237.php on line 3
string(4) "test" string(4) "test"

View file

@ -32,4 +32,3 @@ Stack trace:
Stack trace: Stack trace:
#0 %sbug52361.php(16): bbb() #0 %sbug52361.php(16): bbb()
#1 {main} #1 {main}

View file

@ -7,5 +7,3 @@ var_dump(isset($s[0][0]));
?> ?>
--EXPECT-- --EXPECT--
bool(false) bool(false)

View file

@ -14,4 +14,3 @@ echo "ok\n";
--EXPECT-- --EXPECT--
EROOR: Creating default object from empty value EROOR: Creating default object from empty value
ok ok

View file

@ -22,6 +22,5 @@ $a->__construct();
echo "DONE"; echo "DONE";
?> ?>
--EXPECTF-- --EXPECTF--
Notice: Undefined property: Z::$x in %s on line 14 Notice: Undefined property: Z::$x in %s on line 14
DONE DONE

View file

@ -20,4 +20,3 @@ Fatal error: Uncaught Exception: Exception! in %s:%d
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -37,4 +37,3 @@ object(B)#%d (4) {
["v4"]=> ["v4"]=>
string(1) "B" string(1) "B"
} }

View file

@ -10,6 +10,5 @@ abstract class Foo {
class Bar extends Foo { class Bar extends Foo {
protected function __construct(){} protected function __construct(){}
} }
--EXPECTF-- --EXPECTF--
Fatal error: Access level to Bar::__construct() must be public (as in class Foo) in %s Fatal error: Access level to Bar::__construct() must be public (as in class Foo) in %s

View file

@ -14,6 +14,5 @@ class Bar extends Foo {
class Baz extends Bar { class Baz extends Bar {
protected function __construct(){} protected function __construct(){}
} }
--EXPECTF-- --EXPECTF--
Fatal error: Access level to Baz::__construct() must be public (as in class Bar) in %s Fatal error: Access level to Baz::__construct() must be public (as in class Bar) in %s

View file

@ -17,4 +17,3 @@ namespace ns {
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d Fatal error: Declaration of ns\Foo::method(ns\stdClass $o) must be compatible with Iface::method(stdClass $o) in %s on line %d

View file

@ -35,4 +35,3 @@ Fatal error: Uncaught Error: Cannot call abstract method Foo::bar() in %sbug6311
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %sbug63111.php on line 20 thrown in %sbug63111.php on line 20

View file

@ -49,7 +49,6 @@ $test->protectedProperty = 'value';
$test->privateProperty = 'value'; $test->privateProperty = 'value';
?> ?>
--EXPECTF-- --EXPECTF--
__get nonExisting __get nonExisting
@ -71,4 +70,3 @@ __set nonExisting
__set publicProperty __set publicProperty
__set protectedProperty __set protectedProperty
__set privateProperty __set privateProperty

View file

@ -27,4 +27,3 @@ $x = new Bar;
var_dump($x->run()); var_dump($x->run());
--EXPECT-- --EXPECT--
string(3) "Bar" string(3) "Bar"

View file

@ -50,4 +50,3 @@ Warning: Value for function is no string in %s on line %d
Warning: args element is no array in %s on line %d Warning: args element is no array in %s on line %d
string(60) "#0 [unknown function][unknown][unknown][unknown]() string(60) "#0 [unknown function][unknown][unknown][unknown]()
#1 {main}" #1 {main}"

View file

@ -36,4 +36,3 @@ $o['x'] = 1;
echo $o['x'], "\n"; echo $o['x'], "\n";
--EXPECT-- --EXPECT--
2 2

View file

@ -7,5 +7,4 @@ function a() {
} }
echo "Done\n"; echo "Done\n";
--EXPECTF-- --EXPECTF--
Parse error: memory exhausted in %s on line %d Parse error: memory exhausted in %s on line %d

View file

@ -1,9 +1,7 @@
--TEST-- --TEST--
bug67436: Autoloader isn't called if user defined error handler is present bug67436: Autoloader isn't called if user defined error handler is present
--INI-- --INI--
error_reporting=-1 error_reporting=-1
--FILE-- --FILE--
<?php <?php
@ -20,7 +18,6 @@ a::staticTest();
$b = new b(); $b = new b();
$b->test(); $b->test();
--EXPECT-- --EXPECT--
b::test() b::test()
a::test(c::TESTCONSTANT) a::test(c::TESTCONSTANT)

View file

@ -13,7 +13,6 @@ a::staticTest();
$b = new b(); $b = new b();
$b->test(); $b->test();
--EXPECTF-- --EXPECTF--
Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.inc on line %d Warning: Declaration of b::test() should be compatible with a::test($arg = c::TESTCONSTANT) in %s%ebug67436%eb.inc on line %d
b::test() b::test()

View file

@ -37,4 +37,3 @@ Stack trace:
#0 %s(%d): a(NULL) #0 %s(%d): a(NULL)
#1 {main} #1 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -12,7 +12,6 @@ var_dump(defined("PHP_VERSION"));
var_dump(constant("PHP_VERSION")); var_dump(constant("PHP_VERSION"));
var_dump(call_user_func("strlen")); var_dump(call_user_func("strlen"));
var_dump(is_string("xxx")); var_dump(is_string("xxx"));
--EXPECTF-- --EXPECTF--
bool(false) bool(false)
bool(true) bool(true)

View file

@ -16,4 +16,3 @@ object(Foo)#%d (%d) {
[""]=> [""]=>
int(1) int(1)
} }

View file

@ -28,4 +28,3 @@ Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -27,4 +27,3 @@ bool(true)
bool(false) bool(false)
bool(true) bool(true)
bool(true) bool(true)

View file

@ -29,4 +29,3 @@ string(4) "Test"
bool(true) bool(true)
int(1) int(1)
string(4) "Test" string(4) "Test"

View file

@ -19,4 +19,3 @@ string(7) "default"
string(7) "default" string(7) "default"
string(7) "default" string(7) "default"
string(7) "default" string(7) "default"

View file

@ -81,4 +81,3 @@ float(INF)
Double mod Double mod
Type: DivisionByZeroError Type: DivisionByZeroError
Message: Modulo by zero Message: Modulo by zero

View file

@ -18,9 +18,7 @@ var_dump($foo);
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d Fatal error: Uncaught Error: Cannot assign by reference to overloaded object in %s:%d
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -10,4 +10,3 @@ class B extends A {
} }
--EXPECTF-- --EXPECTF--
Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 7 Warning: Declaration of B::m(array $a = Array) should be compatible with A::m(?array $a = NULL) in %sbug71428.1.php on line 7

View file

@ -20,4 +20,3 @@ echo "ok";
?> ?>
--EXPECT-- --EXPECT--
ok ok

View file

@ -8,4 +8,3 @@ class C extends B { public function m(A $a , $n) { echo "C.m";} };
?> ?>
--EXPECTF-- --EXPECTF--
Warning: Declaration of C::m(A $a, $n) should be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4 Warning: Declaration of C::m(A $a, $n) should be compatible with B::m(?A $a, $n) in %sbug71428.3.php on line 4

View file

@ -16,7 +16,6 @@ function test(&$param) {
?> ?>
--EXPECTF-- --EXPECTF--
Notice: Only variables should be passed by reference in %s on line %d Notice: Only variables should be passed by reference in %s on line %d
object(stdClass)#1 (0) { object(stdClass)#1 (0) {
} }
@ -24,4 +23,3 @@ object(stdClass)#1 (0) {
Notice: Only variables should be passed by reference in %s on line %d Notice: Only variables should be passed by reference in %s on line %d
int(2) int(2)
int(1) int(1)

View file

@ -10,9 +10,7 @@ set_error_handler(
); );
(function (int $i) { bar(); })("7as"); (function (int $i) { bar(); })("7as");
--EXPECTF-- --EXPECTF--
Fatal error: Uncaught Exception: My custom error in %s:%d Fatal error: Uncaught Exception: My custom error in %s:%d
Stack trace: Stack trace:
#0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array) #0 %s(%d): {closure}(8, 'A non well form...', '%s', %d, Array)

View file

@ -16,4 +16,3 @@ echo "OK\n";
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d Fatal error: Declaration of Hello::bar(array $baz = Array) must be compatible with Foo::bar(?array $baz = NULL) in %s on line %d

View file

@ -16,4 +16,3 @@ echo "Value: {$properties[1234]}\n";
--EXPECT-- --EXPECT--
bool(true) bool(true)
Value: Numeric Value: Numeric

View file

@ -23,4 +23,3 @@ Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %sbug74657.php on line %d thrown in %sbug74657.php on line %d

View file

@ -23,4 +23,3 @@ object(Closure)#2 (1) {
string(10) "<required>" string(10) "<required>"
} }
} }

View file

@ -17,4 +17,3 @@ var_dump($name);
string(6) "foofoo" string(6) "foofoo"
int(42) int(42)
int(24) int(24)

View file

@ -13,7 +13,6 @@ class Test
call_user_func("Test::Two", 'A', 'B'); call_user_func("Test::Two", 'A', 'B');
call_user_func(array("Test", "Three"), NULL, 0, false); call_user_func(array("Test", "Three"), NULL, 0, false);
Test::Four(5, 6, 7, 8); Test::Four(5, 6, 7, 8);
--EXPECT-- --EXPECT--
Two() called with 2 arguments Two() called with 2 arguments
Three() called with 3 arguments Three() called with 3 arguments

View file

@ -21,4 +21,3 @@ Notice: Undefined variable: i in %sclosure_012.php on line 2
Notice: Undefined variable: i in %sclosure_012.php on line 7 Notice: Undefined variable: i in %sclosure_012.php on line 7
NULL NULL
int(2) int(2)

View file

@ -12,4 +12,3 @@ Fatal error: Uncaught Error: Closure object cannot have properties in %sclosure_
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %sclosure_022.php on line 5 thrown in %sclosure_022.php on line 5

View file

@ -11,4 +11,3 @@ class foo {
foo::bar(); foo::bar();
--EXPECT-- --EXPECT--
Done Done

View file

@ -16,4 +16,3 @@ try {
?> ?>
--EXPECT-- --EXPECT--
Error: Closure object cannot have properties Error: Closure object cannot have properties

View file

@ -67,4 +67,3 @@ Array
) )
#0 {closure}(23) called at [%s:%d] #0 {closure}(23) called at [%s:%d]
#1 test(Closure Object ()) called at [%s:%d] #1 test(Closure Object ()) called at [%s:%d]

View file

@ -63,7 +63,6 @@ $d = $nonstaticUnscoped->bindTo(new B); $d(); echo " (should be scoped to dummy
$d = $nonstaticScoped->bindTo(new B); $d(); echo "\n"; $d = $nonstaticScoped->bindTo(new B); $d(); echo "\n";
echo "Done.\n"; echo "Done.\n";
--EXPECTF-- --EXPECTF--
Before binding Before binding
scoped to A: bool(false) scoped to A: bool(false)

View file

@ -38,7 +38,6 @@ $d = $staticUnscoped->bindTo(new A, 'A');
$d = $staticScoped->bindTo(new A, 'A'); $d = $staticScoped->bindTo(new A, 'A');
echo "Done.\n"; echo "Done.\n";
--EXPECTF-- --EXPECTF--
Before binding Before binding
bool(false) bool(false)

View file

@ -38,7 +38,6 @@ $d = $nonstaticUnscoped->bindTo(new A, 'A'); $d(); echo "\n";
$d = $nonstaticScoped->bindTo(new A, 'A'); $d(); echo "\n"; $d = $nonstaticScoped->bindTo(new A, 'A'); $d(); echo "\n";
echo "Done.\n"; echo "Done.\n";
--EXPECT-- --EXPECT--
Before binding Before binding
bool(false) bool(false)

View file

@ -13,6 +13,5 @@ $a = A::foo();
$a->bindTo(new A); $a->bindTo(new A);
echo "Done.\n"; echo "Done.\n";
--EXPECT-- --EXPECT--
Done. Done.

View file

@ -38,7 +38,6 @@ echo "After binding, with different instance for the bound one", "\n";
$d = $nonstaticScoped->bindTo(new B, "static"); $d(); echo "\n"; $d = $nonstaticScoped->bindTo(new B, "static"); $d(); echo "\n";
echo "Done.\n"; echo "Done.\n";
--EXPECT-- --EXPECT--
Before binding Before binding
bool(false) bool(false)

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 049: static::class in static closure in non-static method. Closure 049: static::class in static closure in non-static method.
--FILE-- --FILE--
<?php <?php

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 050: static::class in non-static closure in non-static method. Closure 050: static::class in non-static closure in non-static method.
--FILE-- --FILE--
<?php <?php
@ -17,6 +16,5 @@ class B extends A {}
$b = new B; $b = new B;
var_dump($b->foo()); var_dump($b->foo());
--EXPECT-- --EXPECT--
string(1) "B" string(1) "B"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 051: static::class in static closure in static method. Closure 051: static::class in static closure in static method.
--FILE-- --FILE--
<?php <?php
@ -16,6 +15,5 @@ class A {
class B extends A {} class B extends A {}
var_dump(B::foo()); var_dump(B::foo());
--EXPECT-- --EXPECT--
string(1) "B" string(1) "B"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 052: static::class in non-static closure in static method. Closure 052: static::class in non-static closure in static method.
--FILE-- --FILE--
<?php <?php
@ -16,6 +15,5 @@ class A {
class B extends A {} class B extends A {}
var_dump(B::foo()); var_dump(B::foo());
--EXPECT-- --EXPECT--
string(1) "B" string(1) "B"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 053: self::class in static closure in non-static method. Closure 053: self::class in static closure in non-static method.
--FILE-- --FILE--
<?php <?php
@ -17,6 +16,5 @@ class B extends A {}
$b = new B; $b = new B;
var_dump($b->foo()); var_dump($b->foo());
--EXPECT-- --EXPECT--
string(1) "A" string(1) "A"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 054: self::class in non-static closure in non-static method. Closure 054: self::class in non-static closure in non-static method.
--FILE-- --FILE--
<?php <?php
@ -17,6 +16,5 @@ class B extends A {}
$b = new B; $b = new B;
var_dump($b->foo()); var_dump($b->foo());
--EXPECT-- --EXPECT--
string(1) "A" string(1) "A"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 055: self::class in static closure in static method. Closure 055: self::class in static closure in static method.
--FILE-- --FILE--
<?php <?php
@ -16,6 +15,5 @@ class A {
class B extends A {} class B extends A {}
var_dump(B::foo()); var_dump(B::foo());
--EXPECT-- --EXPECT--
string(1) "A" string(1) "A"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Closure 056: self::class in non-static closure in static method. Closure 056: self::class in non-static closure in static method.
--FILE-- --FILE--
<?php <?php
@ -16,6 +15,5 @@ class A {
class B extends A {} class B extends A {}
var_dump(B::foo()); var_dump(B::foo());
--EXPECT-- --EXPECT--
string(1) "A" string(1) "A"

View file

@ -1,6 +1,5 @@
--TEST-- --TEST--
Bug 66622: Closures do not correctly capture the late bound class (static::) in some cases Bug 66622: Closures do not correctly capture the late bound class (static::) in some cases
--FILE-- --FILE--
<?php <?php
class A { class A {
@ -29,7 +28,6 @@ function test() {
B::baz(); B::baz();
} }
test(); test();
--EXPECT-- --EXPECT--
B vs B B vs B
B vs B B vs B

View file

@ -98,7 +98,6 @@ echo $fn(" OK".PHP_EOL);
?> ?>
===DONE=== ===DONE===
--EXPECT-- --EXPECT--
Access public static function OK Access public static function OK
Access public static function with different case OK Access public static function with different case OK
Access public static function with colon scheme OK Access public static function with colon scheme OK

View file

@ -195,7 +195,6 @@ echo "OK\n";
?> ?>
===DONE=== ===DONE===
--EXPECT-- --EXPECT--
Cannot access privateInstance method statically Cannot access privateInstance method statically
Cannot access privateInstance method statically with colon scheme Cannot access privateInstance method statically with colon scheme
Cannot access privateInstance method Cannot access privateInstance method

View file

@ -50,7 +50,6 @@ var_dump($d.$d);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECTF--
Notice: Array to string conversion in %sconcat_001.php on line %d Notice: Array to string conversion in %sconcat_001.php on line %d
string(24) "Arraythis is test object" string(24) "Arraythis is test object"

View file

@ -21,4 +21,3 @@ echo "Done\n";
--EXPECT-- --EXPECT--
int(33554432) int(33554432)
Done Done

View file

@ -7,7 +7,6 @@ error_reporting(E_ALL);
var_dump("foobar"[3]); var_dump("foobar"[3]);
var_dump("foobar"[2][0]); var_dump("foobar"[2][0]);
var_dump("foobar"["foo"]["bar"]); var_dump("foobar"["foo"]["bar"]);
--EXPECTF-- --EXPECTF--
string(1) "b" string(1) "b"
string(1) "o" string(1) "o"

View file

@ -30,7 +30,6 @@ var_dump(define('ELEPHPANT', [new StdClass]));
$recursive = []; $recursive = [];
$recursive[0] = &$recursive; $recursive[0] = &$recursive;
var_dump(define('RECURSION', $recursive)); var_dump(define('RECURSION', $recursive));
--EXPECTF-- --EXPECTF--
array(4) { array(4) {
[0]=> [0]=>

View file

@ -8,4 +8,3 @@ const A = [][] ?? 1;
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Cannot use [] for reading in %s.php on line %d Fatal error: Cannot use [] for reading in %s.php on line %d

View file

@ -45,7 +45,6 @@ var_dump(
?> ?>
--EXPECTF-- --EXPECTF--
Warning: A non-numeric value encountered in %s on line %d Warning: A non-numeric value encountered in %s on line %d
int(3) int(3)
string(4) "1foo" string(4) "1foo"

View file

@ -13,4 +13,3 @@ Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR
Stack trace: Stack trace:
#0 {main} #0 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -36,4 +36,3 @@ Stack trace:
#0 %s(%d): CL->load('class://non.exi...') #0 %s(%d): CL->load('class://non.exi...')
#1 {main} #1 {main}
thrown in %s on line %d thrown in %s on line %d

View file

@ -6,5 +6,4 @@ declare(ticks = UNKNOWN_CONST) {
echo 'Done'; echo 'Done';
} }
--EXPECTF-- --EXPECTF--
Fatal error: declare(ticks) value must be a literal in %sdeclare_006.php on line 2 Fatal error: declare(ticks) value must be a literal in %sdeclare_006.php on line 2

View file

@ -10,5 +10,4 @@ class test {
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (test::foo) in %s on line %d Fatal error: Class test contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (test::foo) in %s on line %d

View file

@ -7,7 +7,6 @@ throw new Exception(1);
?> ?>
--EXPECTF-- --EXPECTF--
Fatal error: Uncaught Exception: 1 in %s:%d Fatal error: Uncaught Exception: 1 in %s:%d
Stack trace: Stack trace:
#0 {main} #0 {main}

Some files were not shown because too many files have changed in this diff Show more