mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
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:
parent
e84662c35c
commit
d679f02295
3401 changed files with 1530 additions and 4009 deletions
|
@ -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
|
||||||
|
|
|
@ -9,5 +9,4 @@ abstract class TestClass
|
||||||
?>
|
?>
|
||||||
===DONE===
|
===DONE===
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
|
|
||||||
===DONE===
|
===DONE===
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -6,5 +6,3 @@ var_dump(new class{});
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
object(class@%s)#%d (0) {
|
object(class@%s)#%d (0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,4 +18,3 @@ var_dump($a instanceof A, $a instanceof B);
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
|
|
||||||
|
|
|
@ -51,4 +51,3 @@ object(class@%s)#1 (1) {
|
||||||
["i"]=>
|
["i"]=>
|
||||||
int(10)
|
int(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,3 @@ namespace {
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
object(class@%s)#1 (0) {
|
object(class@%s)#1 (0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,3 @@ namespace lone {
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
object(class@%s)#2 (0) {
|
object(class@%s)#2 (0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,4 @@ assert.exception=1
|
||||||
var_dump(assert(false));
|
var_dump(assert(false));
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(true)
|
bool(true)
|
||||||
|
|
|
@ -9,4 +9,4 @@ assert(false);
|
||||||
var_dump(true);
|
var_dump(true);
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(true)
|
bool(true)
|
||||||
|
|
|
@ -16,4 +16,3 @@ array(1) {
|
||||||
["public"]=>
|
["public"]=>
|
||||||
string(6) "public"
|
string(6) "public"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,4 +19,4 @@ for ($i = 0; $i < $len; $i++) {
|
||||||
===DONE===
|
===DONE===
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
a-s-d-d-/-?+
|
a-s-d-d-/-?+
|
||||||
===DONE===
|
===DONE===
|
||||||
|
|
|
@ -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]
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ switch ($a) {
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
ok
|
ok
|
||||||
|
|
||||||
|
|
|
@ -51,4 +51,4 @@ object(hariCow)#%d (2) {
|
||||||
["y"]=>
|
["y"]=>
|
||||||
string(1) "y"
|
string(1) "y"
|
||||||
}
|
}
|
||||||
===DONE===
|
===DONE===
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,4 @@ throw 1;
|
||||||
Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2
|
Fatal error: Uncaught Error: Can only throw objects in %sbug33318.php:2
|
||||||
Stack trace:
|
Stack trace:
|
||||||
#0 {main}
|
#0 {main}
|
||||||
thrown in %sbug33318.php on line 2
|
thrown in %sbug33318.php on line 2
|
||||||
|
|
|
@ -18,4 +18,3 @@ echo "$a\n";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
ok
|
ok
|
||||||
|
|
||||||
|
|
|
@ -21,4 +21,3 @@ try {
|
||||||
(((
|
(((
|
||||||
here
|
here
|
||||||
)))
|
)))
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,3 @@ if(!$kids) echo "ok\n"; else echo "bug\n";
|
||||||
bool(false)
|
bool(false)
|
||||||
ok
|
ok
|
||||||
ok
|
ok
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,4 @@ print_r(str_replace('a', 'b', array(-1 =>-1)));
|
||||||
Array
|
Array
|
||||||
(
|
(
|
||||||
[-1] => -1
|
[-1] => -1
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,4 +11,4 @@ $a[0]->b = 0;
|
||||||
Fatal error: Uncaught Error: __clone method called on non-object in %sbug36071.php:2
|
Fatal error: Uncaught Error: __clone method called on non-object in %sbug36071.php:2
|
||||||
Stack trace:
|
Stack trace:
|
||||||
#0 {main}
|
#0 {main}
|
||||||
thrown in %sbug36071.php on line 2
|
thrown in %sbug36071.php on line 2
|
||||||
|
|
|
@ -18,4 +18,3 @@ stch::g ();
|
||||||
EHLO
|
EHLO
|
||||||
EHLO
|
EHLO
|
||||||
EHLO
|
EHLO
|
||||||
|
|
||||||
|
|
|
@ -13,4 +13,3 @@ echo "NO LEAK\n";
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
clonned
|
clonned
|
||||||
NO LEAK
|
NO LEAK
|
||||||
|
|
||||||
|
|
|
@ -14,4 +14,4 @@ echo $current($a)."\n";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
one
|
one
|
||||||
two
|
two
|
||||||
|
|
|
@ -7,4 +7,4 @@ echo "\n";
|
||||||
echo 6/+2*-3;
|
echo 6/+2*-3;
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
-2.5
|
-2.5
|
||||||
-9
|
-9
|
||||||
|
|
|
@ -35,4 +35,3 @@ bool(false)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(false)
|
bool(false)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -28,4 +28,3 @@ bool(true)
|
||||||
bool(false)
|
bool(false)
|
||||||
bool(false)
|
bool(false)
|
||||||
bool(false)
|
bool(false)
|
||||||
|
|
||||||
|
|
|
@ -9,4 +9,4 @@ class Bar {}
|
||||||
use Test\Bar;
|
use Test\Bar;
|
||||||
echo "ok\n";
|
echo "ok\n";
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
ok
|
ok
|
||||||
|
|
|
@ -48,4 +48,3 @@ Class [ <user> class x extends c implements a, b ] {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,4 +58,4 @@ string(1) "C"
|
||||||
__callstatic:
|
__callstatic:
|
||||||
string(3) "FOO"
|
string(3) "FOO"
|
||||||
__callstatic:
|
__callstatic:
|
||||||
string(3) "FOO"
|
string(3) "FOO"
|
||||||
|
|
|
@ -28,7 +28,6 @@ $child->test();
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
|
|
||||||
From parent scope
|
From parent scope
|
||||||
array(1) {
|
array(1) {
|
||||||
["prot"]=>
|
["prot"]=>
|
||||||
|
|
|
@ -10,4 +10,3 @@ var_dump(ini_get("arg_separator.output"));
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(false)
|
bool(false)
|
||||||
string(1) "&"
|
string(1) "&"
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -21,4 +21,3 @@ var_dump($arg);
|
||||||
bar called!
|
bar called!
|
||||||
bar called!
|
bar called!
|
||||||
int(3)
|
int(3)
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,4 @@ $foo->start();
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
instance
|
instance
|
||||||
instance
|
instance
|
||||||
instance
|
instance
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -32,4 +32,3 @@ Stack trace:
|
||||||
Stack trace:
|
Stack trace:
|
||||||
#0 %sbug52361.php(16): bbb()
|
#0 %sbug52361.php(16): bbb()
|
||||||
#1 {main}
|
#1 {main}
|
||||||
|
|
||||||
|
|
|
@ -7,5 +7,3 @@ var_dump(isset($s[0][0]));
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(false)
|
bool(false)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -37,4 +37,3 @@ object(B)#%d (4) {
|
||||||
["v4"]=>
|
["v4"]=>
|
||||||
string(1) "B"
|
string(1) "B"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,3 @@ $x = new Bar;
|
||||||
var_dump($x->run());
|
var_dump($x->run());
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
string(3) "Bar"
|
string(3) "Bar"
|
||||||
|
|
||||||
|
|
|
@ -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}"
|
||||||
|
|
||||||
|
|
|
@ -36,4 +36,3 @@ $o['x'] = 1;
|
||||||
echo $o['x'], "\n";
|
echo $o['x'], "\n";
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
2
|
2
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -20,4 +20,4 @@ ghi::def();
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
ghi
|
ghi
|
||||||
ghi
|
ghi
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,4 @@ echo "Bye"
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in %s on line %d
|
Warning: declare(encoding=...) ignored because Zend multibyte feature is turned off by settings in %s on line %d
|
||||||
|
|
||||||
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
|
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
|
||||||
|
|
|
@ -19,4 +19,4 @@ function foo() {
|
||||||
echo "Bye"
|
echo "Bye"
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
|
Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -16,4 +16,3 @@ object(Foo)#%d (%d) {
|
||||||
[""]=>
|
[""]=>
|
||||||
int(1)
|
int(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,3 @@ bool(true)
|
||||||
bool(false)
|
bool(false)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
bool(true)
|
||||||
|
|
||||||
|
|
|
@ -29,4 +29,3 @@ string(4) "Test"
|
||||||
bool(true)
|
bool(true)
|
||||||
int(1)
|
int(1)
|
||||||
string(4) "Test"
|
string(4) "Test"
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -81,4 +81,3 @@ float(INF)
|
||||||
Double mod
|
Double mod
|
||||||
Type: DivisionByZeroError
|
Type: DivisionByZeroError
|
||||||
Message: Modulo by zero
|
Message: Modulo by zero
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,3 @@ echo "ok";
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
ok
|
ok
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -12,4 +12,4 @@ for ($i = 0; $i < 100000; $i++) {
|
||||||
?>
|
?>
|
||||||
OK
|
OK
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
OK
|
OK
|
||||||
|
|
|
@ -24,4 +24,4 @@ NULL
|
||||||
Warning: Cannot assign an empty string to a string offset in %s on line %d
|
Warning: Cannot assign an empty string to a string offset in %s on line %d
|
||||||
NULL
|
NULL
|
||||||
string(3) "abc"
|
string(3) "abc"
|
||||||
==DONE==
|
==DONE==
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,3 @@ echo "Value: {$properties[1234]}\n";
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
bool(true)
|
bool(true)
|
||||||
Value: Numeric
|
Value: Numeric
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,3 @@ object(Closure)#2 (1) {
|
||||||
string(10) "<required>"
|
string(10) "<required>"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,4 +17,3 @@ var_dump($name);
|
||||||
string(6) "foofoo"
|
string(6) "foofoo"
|
||||||
int(42)
|
int(42)
|
||||||
int(24)
|
int(24)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -12,4 +12,4 @@ class_alias('foo', 'test');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
Warning: Cannot declare class test, because the name is already in use in %s on line %d
|
Warning: Cannot declare class test, because the name is already in use in %s on line %d
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -11,4 +11,3 @@ class foo {
|
||||||
foo::bar();
|
foo::bar();
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Done
|
Done
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,4 @@ echo "Done.\n";
|
||||||
11
|
11
|
||||||
12
|
12
|
||||||
12
|
12
|
||||||
Done.
|
Done.
|
||||||
|
|
|
@ -16,4 +16,3 @@ try {
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
Error: Closure object cannot have properties
|
Error: Closure object cannot have properties
|
||||||
|
|
||||||
|
|
|
@ -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]
|
||||||
|
|
||||||
|
|
|
@ -30,4 +30,4 @@ var_dump($cb2());
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
int(1)
|
int(1)
|
||||||
int(11)
|
int(11)
|
||||||
int(12)
|
int(12)
|
||||||
|
|
|
@ -44,4 +44,4 @@ Done.
|
||||||
1
|
1
|
||||||
42
|
42
|
||||||
forty two
|
forty two
|
||||||
Done.
|
Done.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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.
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue