mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Run tidy
This should fix most of the remaining issues with tabs and spaces being mixed in tests.
This commit is contained in:
@@ -41,8 +41,8 @@ $sources = [
|
||||
];
|
||||
|
||||
foreach ($sources as $r) {
|
||||
$attr = $r->getAttributes();
|
||||
var_dump(get_class($r), count($attr));
|
||||
$attr = $r->getAttributes();
|
||||
var_dump(get_class($r), count($attr));
|
||||
|
||||
foreach ($attr as $a) {
|
||||
var_dump($a->getName(), $a->getArguments());
|
||||
|
||||
@@ -8,7 +8,7 @@ define('V1', strtoupper(php_sapi_name()));
|
||||
#[A1([V1 => V1])]
|
||||
class C1
|
||||
{
|
||||
public const BAR = 'bar';
|
||||
public const BAR = 'bar';
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(C1::class);
|
||||
@@ -38,7 +38,7 @@ echo "\n";
|
||||
#[A1(self::FOO, C1::BAR)]
|
||||
class C3
|
||||
{
|
||||
private const FOO = 'foo';
|
||||
private const FOO = 'foo';
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(C3::class);
|
||||
@@ -62,7 +62,7 @@ echo "\n";
|
||||
#[Attribute]
|
||||
class C5
|
||||
{
|
||||
public function __construct() { }
|
||||
public function __construct() { }
|
||||
}
|
||||
|
||||
$ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { });
|
||||
@@ -70,15 +70,15 @@ $attr = $ref->getAttributes();
|
||||
var_dump(count($attr));
|
||||
|
||||
try {
|
||||
$attr[0]->getArguments();
|
||||
$attr[0]->getArguments();
|
||||
} catch (\Error $e) {
|
||||
var_dump($e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
$attr[0]->newInstance();
|
||||
$attr[0]->newInstance();
|
||||
} catch (\Error $e) {
|
||||
var_dump($e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -6,22 +6,22 @@ Attributes can be converted into objects.
|
||||
#[Attribute(Attribute::TARGET_FUNCTION)]
|
||||
class A1
|
||||
{
|
||||
public string $name;
|
||||
public int $ttl;
|
||||
public string $name;
|
||||
public int $ttl;
|
||||
|
||||
public function __construct(string $name, int $ttl = 50)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->ttl = $ttl;
|
||||
}
|
||||
public function __construct(string $name, int $ttl = 50)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->ttl = $ttl;
|
||||
}
|
||||
}
|
||||
|
||||
$ref = new \ReflectionFunction(#[A1('test')] function () { });
|
||||
|
||||
foreach ($ref->getAttributes() as $attr) {
|
||||
$obj = $attr->newInstance();
|
||||
$obj = $attr->newInstance();
|
||||
|
||||
var_dump(get_class($obj), $obj->name, $obj->ttl);
|
||||
var_dump(get_class($obj), $obj->name, $obj->ttl);
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -29,9 +29,9 @@ echo "\n";
|
||||
$ref = new \ReflectionFunction(#[A1] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\ArgumentCountError $e) {
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -39,9 +39,9 @@ echo "\n";
|
||||
$ref = new \ReflectionFunction(#[A1([])] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\TypeError $e) {
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -49,9 +49,9 @@ echo "\n";
|
||||
$ref = new \ReflectionFunction(#[A2] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 3', $e->getMessage());
|
||||
var_dump('ERROR 3', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -59,15 +59,15 @@ echo "\n";
|
||||
#[Attribute]
|
||||
class A3
|
||||
{
|
||||
private function __construct() { }
|
||||
private function __construct() { }
|
||||
}
|
||||
|
||||
$ref = new \ReflectionFunction(#[A3] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 4', $e->getMessage());
|
||||
var_dump('ERROR 4', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -78,9 +78,9 @@ class A4 { }
|
||||
$ref = new \ReflectionFunction(#[A4(1)] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 5', $e->getMessage());
|
||||
var_dump('ERROR 5', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -90,9 +90,9 @@ class A5 { }
|
||||
$ref = new \ReflectionFunction(#[A5] function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
$ref->getAttributes()[0]->newInstance();
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 6', $e->getMessage());
|
||||
var_dump('ERROR 6', $e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -55,17 +55,17 @@ echo "\n";
|
||||
$ref = new \ReflectionFunction(function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes(A1::class, 3);
|
||||
$ref->getAttributes(A1::class, 3);
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
}
|
||||
|
||||
$ref = new \ReflectionFunction(function () { });
|
||||
|
||||
try {
|
||||
$ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF);
|
||||
$ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF);
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -6,19 +6,19 @@ Attributes comply with inheritance rules.
|
||||
#[A2]
|
||||
class C1
|
||||
{
|
||||
#[A1]
|
||||
public function foo() { }
|
||||
#[A1]
|
||||
public function foo() { }
|
||||
}
|
||||
|
||||
class C2 extends C1
|
||||
{
|
||||
public function foo() { }
|
||||
public function foo() { }
|
||||
}
|
||||
|
||||
class C3 extends C1
|
||||
{
|
||||
#[A1]
|
||||
public function bar() { }
|
||||
#[A1]
|
||||
public function bar() { }
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(C1::class);
|
||||
@@ -37,20 +37,20 @@ echo "\n";
|
||||
|
||||
trait T1
|
||||
{
|
||||
#[A2]
|
||||
public $a;
|
||||
#[A2]
|
||||
public $a;
|
||||
}
|
||||
|
||||
class C4
|
||||
{
|
||||
use T1;
|
||||
use T1;
|
||||
}
|
||||
|
||||
class C5
|
||||
{
|
||||
use T1;
|
||||
use T1;
|
||||
|
||||
public $a;
|
||||
public $a;
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(T1::class);
|
||||
|
||||
@@ -12,15 +12,15 @@ assert(0 && ($a = #[A1] #[A2] function ($a, #[A3(1)] $b) { }));
|
||||
assert(0 && ($a = #[A1(1, 2, 1 + 2)] fn () => 1));
|
||||
|
||||
assert(0 && ($a = new #[A1] class() {
|
||||
#[A1]#[A2] const FOO = 'foo';
|
||||
#[A2] public $x;
|
||||
#[A3] function a() { }
|
||||
#[A1]#[A2] const FOO = 'foo';
|
||||
#[A2] public $x;
|
||||
#[A3] function a() { }
|
||||
}));
|
||||
|
||||
assert(0 && ($a = function () {
|
||||
#[A1] class Test1 { }
|
||||
#[A2] interface Test2 { }
|
||||
#[A3] trait Test3 { }
|
||||
#[A1] class Test1 { }
|
||||
#[A2] interface Test2 { }
|
||||
#[A3] trait Test3 { }
|
||||
}));
|
||||
|
||||
?>
|
||||
|
||||
@@ -6,14 +6,14 @@ Attributes make use of class scope.
|
||||
#[A1(self::class, self::FOO)]
|
||||
class C1
|
||||
{
|
||||
#[A1(self::class, self::FOO)]
|
||||
private const FOO = 'foo';
|
||||
#[A1(self::class, self::FOO)]
|
||||
private const FOO = 'foo';
|
||||
|
||||
#[A1(self::class, self::FOO)]
|
||||
public $a;
|
||||
#[A1(self::class, self::FOO)]
|
||||
public $a;
|
||||
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function bar(#[A1(self::class, self::FOO)] $p) { }
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function bar(#[A1(self::class, self::FOO)] $p) { }
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(C1::class);
|
||||
@@ -27,15 +27,15 @@ echo "\n";
|
||||
|
||||
trait T1
|
||||
{
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function foo() { }
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function foo() { }
|
||||
}
|
||||
|
||||
class C2
|
||||
{
|
||||
use T1;
|
||||
use T1;
|
||||
|
||||
private const FOO = 'bar';
|
||||
private const FOO = 'bar';
|
||||
}
|
||||
|
||||
$ref = new \ReflectionClass(C2::class);
|
||||
@@ -45,7 +45,7 @@ $ref = new \ReflectionClass(T1::class);
|
||||
$attr = $ref->getMethod('foo')->getAttributes()[0];
|
||||
|
||||
try {
|
||||
$attr->getArguments();
|
||||
$attr->getArguments();
|
||||
} catch (\Error $e) {
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
}
|
||||
@@ -54,17 +54,17 @@ echo "\n";
|
||||
|
||||
class C3
|
||||
{
|
||||
private const FOO = 'foo';
|
||||
private const FOO = 'foo';
|
||||
|
||||
public static function foo()
|
||||
{
|
||||
return new #[A1(self::class, self::FOO)] class() {
|
||||
private const FOO = 'bar';
|
||||
public static function foo()
|
||||
{
|
||||
return new #[A1(self::class, self::FOO)] class() {
|
||||
private const FOO = 'bar';
|
||||
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function bar() { }
|
||||
};
|
||||
}
|
||||
#[A1(self::class, self::FOO)]
|
||||
public function bar() { }
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
$ref = new \ReflectionObject(C3::foo());
|
||||
|
||||
@@ -5,8 +5,8 @@ Attributes cannot be applied to groups of class constants.
|
||||
|
||||
class C1
|
||||
{
|
||||
#[A1]
|
||||
public const A = 1, B = 2;
|
||||
#[A1]
|
||||
public const A = 1, B = 2;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -5,8 +5,8 @@ Attributes cannot be applied to groups of properties.
|
||||
|
||||
class C1
|
||||
{
|
||||
#[A1]
|
||||
public $x, $y;
|
||||
#[A1]
|
||||
public $x, $y;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -5,17 +5,17 @@ Attributes make use of closure scope.
|
||||
|
||||
class Test1
|
||||
{
|
||||
private const FOO = 'bar';
|
||||
private const FOO = 'bar';
|
||||
}
|
||||
|
||||
class C1
|
||||
{
|
||||
private const FOO = 'foo';
|
||||
private const FOO = 'foo';
|
||||
|
||||
public static function foo()
|
||||
{
|
||||
return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { };
|
||||
}
|
||||
public static function foo()
|
||||
{
|
||||
return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { };
|
||||
}
|
||||
}
|
||||
|
||||
$ref = new \ReflectionFunction(C1::foo());
|
||||
|
||||
@@ -18,9 +18,9 @@ $attr = $ref->getAttributes()[0];
|
||||
var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_CLASS, $attr->isRepeated());
|
||||
|
||||
try {
|
||||
$attr->newInstance();
|
||||
$attr->newInstance();
|
||||
} catch (\Throwable $e) {
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
var_dump('ERROR 1', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
@@ -30,9 +30,9 @@ $attr = $ref->getAttributes()[0];
|
||||
var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_FUNCTION, $attr->isRepeated());
|
||||
|
||||
try {
|
||||
$attr->newInstance();
|
||||
$attr->newInstance();
|
||||
} catch (\Throwable $e) {
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
var_dump('ERROR 2', $e->getMessage());
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
|
||||
@@ -4,10 +4,10 @@ Trailing comma in attribute argument list
|
||||
<?php
|
||||
|
||||
#[MyAttribute(
|
||||
"there",
|
||||
"are",
|
||||
"many",
|
||||
"arguments",
|
||||
"there",
|
||||
"are",
|
||||
"many",
|
||||
"arguments",
|
||||
)]
|
||||
class Foo { }
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ memory_limit=8M
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -6,7 +6,7 @@ memory_limit=8M
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 9223372036854775807)
|
||||
die("skip for 64-bit long systems only");
|
||||
die("skip for 64-bit long systems only");
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump("9223372036854775807" == "9223372036854775808");
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #62097: fix for bug #54547 is wrong for 32-bit machines
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_MAX !== 2147483647)
|
||||
die('skip for system with 32-bit wide longs only');
|
||||
die('skip for system with 32-bit wide longs only');
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump("02147483647" == "2147483647",
|
||||
|
||||
@@ -6,7 +6,7 @@ memory_limit=2M
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #70914 zend_throw_or_error() format string vulnerability
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("pdo_sqlite")) {
|
||||
die("skip pdo_sqlite required");
|
||||
die("skip pdo_sqlite required");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -6,7 +6,7 @@ memory_limit=33M
|
||||
<?php
|
||||
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
|
||||
if ($zend_mm_enabled === "0") {
|
||||
die("skip Zend MM disabled");
|
||||
die("skip Zend MM disabled");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,23 +3,23 @@ Bug #79599 (coredump in set_error_handler)
|
||||
--FILE--
|
||||
<?php
|
||||
set_error_handler(function($code, $message){
|
||||
throw new \Exception($message);
|
||||
throw new \Exception($message);
|
||||
});
|
||||
function test1(){
|
||||
$a[] = $b;
|
||||
$a[] = $b;
|
||||
}
|
||||
function test2(){
|
||||
$a[$c] = $b;
|
||||
$a[$c] = $b;
|
||||
}
|
||||
try{
|
||||
test1();
|
||||
test1();
|
||||
}catch(\Exception $e){
|
||||
var_dump($e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
try{
|
||||
test2();
|
||||
test2();
|
||||
}catch(\Exception $e){
|
||||
var_dump($e->getMessage());
|
||||
var_dump($e->getMessage());
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -5,21 +5,21 @@ Bug #80037: Typed property must not be accessed before initialization when __get
|
||||
|
||||
final class A
|
||||
{
|
||||
public string $a;
|
||||
public string $a;
|
||||
|
||||
public static function fromArray(array $props): self
|
||||
{
|
||||
$me = new static;
|
||||
foreach ($props as $k => &$v) {
|
||||
$me->{$k} = &$v; # try to remove &
|
||||
}
|
||||
return $me;
|
||||
}
|
||||
public static function fromArray(array $props): self
|
||||
{
|
||||
$me = new static;
|
||||
foreach ($props as $k => &$v) {
|
||||
$me->{$k} = &$v; # try to remove &
|
||||
}
|
||||
return $me;
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
throw new \LogicException("Property '$name' is not defined.");
|
||||
}
|
||||
public function __get($name)
|
||||
{
|
||||
throw new \LogicException("Property '$name' is not defined.");
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(A::fromArray(['a' => 'foo']));
|
||||
|
||||
@@ -3,7 +3,7 @@ zend_dval_to_lval preserves low bits (32 bit long)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_SIZE != 4)
|
||||
die("skip for machines with 32-bit longs");
|
||||
die("skip for machines with 32-bit longs");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,7 @@ zend_dval_to_lval preserves low bits (64 bit long)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (PHP_INT_SIZE != 8)
|
||||
die("skip for machines with 64-bit longs");
|
||||
die("skip for machines with 64-bit longs");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -4,10 +4,10 @@ A generator can be yielded from multiple times, testing immediate release of the
|
||||
<?php
|
||||
|
||||
function gen() {
|
||||
yield 42;
|
||||
yield 42;
|
||||
}
|
||||
function yield_from($gen) {
|
||||
yield from $gen;
|
||||
yield from $gen;
|
||||
}
|
||||
$gen = gen();
|
||||
var_dump(yield_from($gen)->current());
|
||||
|
||||
@@ -3,7 +3,7 @@ __set first parameter should be a string when typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __set(\Countable $name, $value) {}
|
||||
function __set(\Countable $name, $value) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __get first parameter should be a string when typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __get(int $name) {}
|
||||
function __get(int $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __isset first parameter should be a string when typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __isset(\stdClass $name) {}
|
||||
function __isset(\stdClass $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __unset first parameter should be a string when typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __unset(array $name) {}
|
||||
function __unset(array $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __call first parameter should be a string typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __call(int $name, array $arguments) {}
|
||||
function __call(int $name, array $arguments) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __call second parameter should be an array when typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __call(string $name, \Arguments $arguments) {}
|
||||
function __call(string $name, \Arguments $arguments) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __callStatic first parameter should be a string typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
static function __callStatic(int $name, array $arguments) {}
|
||||
static function __callStatic(int $name, array $arguments) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __callStatic second parameter should be an array typed
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
static function __callStatic(string $name, \Arguments $args) {}
|
||||
static function __callStatic(string $name, \Arguments $args) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __unserialize first parameter must be an array
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public function __unserialize(string $name) {}
|
||||
public function __unserialize(string $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -4,7 +4,7 @@ __set_state first parameter must be an array
|
||||
<?php
|
||||
|
||||
class Foo {
|
||||
public static function __set_state(int $properties) {}
|
||||
public static function __set_state(int $properties) {}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -3,65 +3,65 @@ Magic Methods inheritance rules
|
||||
--FILE--
|
||||
<?php
|
||||
class ValidMagicMethods {
|
||||
public function __call(string $name, array $arguments): mixed {}
|
||||
public function __call(string $name, array $arguments): mixed {}
|
||||
|
||||
public static function __callStatic(string $name, array $arguments): mixed {}
|
||||
public static function __callStatic(string $name, array $arguments): mixed {}
|
||||
|
||||
public function __clone(): void {}
|
||||
public function __clone(): void {}
|
||||
|
||||
public function __debugInfo(): ?array {}
|
||||
public function __debugInfo(): ?array {}
|
||||
|
||||
public function __get(string $name): mixed {}
|
||||
public function __get(string $name): mixed {}
|
||||
|
||||
public function __invoke(mixed $arguments): mixed {}
|
||||
public function __invoke(mixed $arguments): mixed {}
|
||||
|
||||
public function __isset(string $name): bool {}
|
||||
public function __isset(string $name): bool {}
|
||||
|
||||
public function __serialize(): array {}
|
||||
public function __serialize(): array {}
|
||||
|
||||
public function __set(string $name, mixed $value): void {}
|
||||
public function __set(string $name, mixed $value): void {}
|
||||
|
||||
public static function __set_state(array $properties): object {}
|
||||
public static function __set_state(array $properties): object {}
|
||||
|
||||
public function __sleep(): array {}
|
||||
public function __sleep(): array {}
|
||||
|
||||
public function __toString(): string {}
|
||||
public function __toString(): string {}
|
||||
|
||||
public function __unserialize(array $data): void {}
|
||||
public function __unserialize(array $data): void {}
|
||||
|
||||
public function __unset(string $name): void {}
|
||||
public function __unset(string $name): void {}
|
||||
|
||||
public function __wakeup(): void {}
|
||||
public function __wakeup(): void {}
|
||||
}
|
||||
|
||||
class NarrowedReturnType extends ValidMagicMethods {
|
||||
public function __call(string $name, array $arguments): string|float|null {}
|
||||
public function __call(string $name, array $arguments): string|float|null {}
|
||||
|
||||
public static function __callStatic(string $name, array $arguments): ?array {}
|
||||
public static function __callStatic(string $name, array $arguments): ?array {}
|
||||
|
||||
public function __debugInfo(): array {}
|
||||
public function __debugInfo(): array {}
|
||||
|
||||
public function __get(string $name): int|string {}
|
||||
public function __get(string $name): int|string {}
|
||||
|
||||
public function __invoke(mixed $arguments): object {}
|
||||
public function __invoke(mixed $arguments): object {}
|
||||
}
|
||||
|
||||
class WidenedArgumentType extends NarrowedReturnType {
|
||||
public function __call(string|array $name, array|string $arguments): string|float|null {}
|
||||
public function __call(string|array $name, array|string $arguments): string|float|null {}
|
||||
|
||||
public static function __callStatic(string|object $name, array|object $arguments): ?array {}
|
||||
public static function __callStatic(string|object $name, array|object $arguments): ?array {}
|
||||
|
||||
public function __get(string|array $name): int|string {}
|
||||
public function __get(string|array $name): int|string {}
|
||||
|
||||
public function __isset(string|bool $name): bool {}
|
||||
public function __isset(string|bool $name): bool {}
|
||||
|
||||
public function __set(string|bool|float $name, mixed $value): void {}
|
||||
public function __set(string|bool|float $name, mixed $value): void {}
|
||||
|
||||
public static function __set_state(string|array $properties): object {}
|
||||
public static function __set_state(string|array $properties): object {}
|
||||
|
||||
public function __unserialize(array|string $data): void {}
|
||||
public function __unserialize(array|string $data): void {}
|
||||
|
||||
public function __unset(string|array $name): void {}
|
||||
public function __unset(string|array $name): void {}
|
||||
}
|
||||
|
||||
echo 'No problems!';
|
||||
|
||||
@@ -3,15 +3,15 @@ Magic Methods inheritance rules on a non-trivial class hierarchy
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __get(string|array $name): mixed {} // valid
|
||||
public function __get(string|array $name): mixed {} // valid
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
public function __get(string|array|object $name): int {} // also valid
|
||||
public function __get(string|array|object $name): int {} // also valid
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function __get(string|array $name): int {} // this is invalid
|
||||
public function __get(string|array $name): int {} // this is invalid
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,15 +3,15 @@ Magic Methods inheritance rules on a non-trivial class hierarchy
|
||||
--FILE--
|
||||
<?php
|
||||
class A {
|
||||
public function __get(string|array $name): mixed {} // valid
|
||||
public function __get(string|array $name): mixed {} // valid
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
public function __get(string|array|object $name): int {} // also valid
|
||||
public function __get(string|array|object $name): int {} // also valid
|
||||
}
|
||||
|
||||
class C extends B {
|
||||
public function __get(string|array|object $name): int|float {} // this is invalid
|
||||
public function __get(string|array|object $name): int|float {} // this is invalid
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __sleep cannot take arguments
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public function __sleep(string $name) {}
|
||||
public function __sleep(string $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __wakeup cannot take arguments
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
public function __wakeup(string $name) {}
|
||||
public function __wakeup(string $name) {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __set can only declare void return
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __set($name, $value) : string {}
|
||||
function __set($name, $value) : string {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __isset can only declare a boolean return type
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __isset($name) : \stdClass|bool {}
|
||||
function __isset($name) : \stdClass|bool {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -3,7 +3,7 @@ __unset can only declare void return
|
||||
--FILE--
|
||||
<?php
|
||||
class Foo {
|
||||
function __unset($name) : bool {}
|
||||
function __unset($name) : bool {}
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
||||
@@ -262,7 +262,7 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */
|
||||
OBJ_RELEASE(&parent->std);
|
||||
/* Reset for resuming in finally */
|
||||
generator->node.parent = NULL;
|
||||
generator->node.ptr.root = generator;
|
||||
generator->node.ptr.root = generator;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ if (!$result) {
|
||||
$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt");
|
||||
|
||||
if (file_exists($fpath)) {
|
||||
unlink($fpath);
|
||||
unlink($fpath);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -5,9 +5,9 @@ Bug #66431 Special Character via COM Interface (CP_UTF8), Application.Word
|
||||
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
|
||||
|
||||
try {
|
||||
new COM("word.application", NULL, CP_UTF8);
|
||||
new COM("word.application", NULL, CP_UTF8);
|
||||
} catch (Exception $e) {
|
||||
die('skip ' . $e->getMessage());
|
||||
die('skip ' . $e->getMessage());
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -51,7 +51,7 @@ if (!$result) {
|
||||
$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx");
|
||||
|
||||
if (file_exists($fpath)) {
|
||||
unlink($fpath);
|
||||
unlink($fpath);
|
||||
}
|
||||
?>
|
||||
--EXPECT--
|
||||
|
||||
@@ -5,7 +5,7 @@ COM: General variant tests
|
||||
if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present";
|
||||
if (8 != PHP_INT_SIZE) print "skip x64 only";
|
||||
if ((string) variant_cat(new VARIANT(false), new VARIANT(0.5)) != 'False0.5')
|
||||
print "skip English locale only";
|
||||
print "skip English locale only";
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #46711 (lost memory when foreach is used for values passed to curl_setopt())
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #48514 (cURL extension uses same resource name for simple and multi APIs)
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #52827 (curl_setopt with CURLOPT_STDERR erroneously increments the resource
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -18,9 +18,9 @@ Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
$base_dir = __DIR__ . DIRECTORY_SEPARATOR . "bug61948";
|
||||
rmdir("$base_dir/foo");
|
||||
rmdir($base_dir);
|
||||
$base_dir = __DIR__ . DIRECTORY_SEPARATOR . "bug61948";
|
||||
rmdir("$base_dir/foo");
|
||||
rmdir($base_dir);
|
||||
?>
|
||||
--EXPECTF--
|
||||
%a
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ Bug #72202 (curl_close doesn't close cURL handle)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,11 +4,11 @@ Bug #76675 (Segfault with H2 server push write/writeheader handlers)
|
||||
<?php
|
||||
include 'skipif.inc';
|
||||
if (getenv("SKIP_ONLINE_TESTS")) {
|
||||
die("skip online test");
|
||||
die("skip online test");
|
||||
}
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x073d00) {
|
||||
exit("skip: test may crash with curl < 7.61.0");
|
||||
exit("skip: test may crash with curl < 7.61.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,11 +4,11 @@ Bug #77535 (Invalid callback, h2 server push)
|
||||
<?php
|
||||
include 'skipif.inc';
|
||||
if (getenv("SKIP_ONLINE_TESTS")) {
|
||||
die("skip online test");
|
||||
die("skip online test");
|
||||
}
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x073d00) {
|
||||
exit("skip: test may crash with curl < 7.61.0");
|
||||
exit("skip: test may crash with curl < 7.61.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #77946 (Errored cURL resources returned by curl_multi_info_read() must be co
|
||||
<?php
|
||||
|
||||
if (!extension_loaded('curl')) {
|
||||
exit('skip curl extension not loaded');
|
||||
exit('skip curl extension not loaded');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -4,7 +4,7 @@ Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared prope
|
||||
<?php
|
||||
|
||||
class Test {
|
||||
public $prop = "value";
|
||||
public $prop = "value";
|
||||
}
|
||||
|
||||
$ch = curl_init();
|
||||
|
||||
@@ -3,7 +3,7 @@ Check libcurl config on windows
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
die('skip - curl extension not available in this build');
|
||||
die('skip - curl extension not available in this build');
|
||||
}
|
||||
if(substr(PHP_OS, 0, 3) != 'WIN' )
|
||||
die("skip for windows only");
|
||||
|
||||
@@ -4,11 +4,11 @@ Test curl_error() & curl_errno() function with problematic host
|
||||
TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) print "skip";
|
||||
$addr = "www.".uniqid().".".uniqid();
|
||||
if (gethostbyname($addr) != $addr) {
|
||||
print "skip catch all dns";
|
||||
}
|
||||
if (!extension_loaded("curl")) print "skip";
|
||||
$addr = "www.".uniqid().".".uniqid();
|
||||
if (gethostbyname($addr) != $addr) {
|
||||
print "skip catch all dns";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -4,11 +4,11 @@ Test curl_error() & curl_errno() function with problematic proxy
|
||||
TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net>
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) print "skip";
|
||||
$addr = "www.".uniqid().".".uniqid();
|
||||
if (gethostbyname($addr) != $addr) {
|
||||
print "skip catch all dns";
|
||||
}
|
||||
if (!extension_loaded("curl")) print "skip";
|
||||
$addr = "www.".uniqid().".".uniqid();
|
||||
if (gethostbyname($addr) != $addr) {
|
||||
print "skip catch all dns";
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -4,7 +4,7 @@ Test curl_getinfo() function with CURLINFO_HTTP_VERSION parameter
|
||||
<?php if (!extension_loaded("curl")) print "skip";
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x073200) {
|
||||
exit("skip: test works only with curl >= 7.50.0");
|
||||
exit("skip: test works only with curl >= 7.50.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -4,7 +4,7 @@ Test curl_getinfo() function with CURLINFO_* from curl >= 7.52.0
|
||||
<?php if (!extension_loaded("curl")) print "skip";
|
||||
$curl_version = curl_version();
|
||||
if ($curl_version['version_number'] < 0x073400) {
|
||||
exit("skip: test works only with curl >= 7.52.0");
|
||||
exit("skip: test works only with curl >= 7.52.0");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -5,7 +5,7 @@ Francesco Fullone ff@ideato.it
|
||||
#PHPTestFest Cesena Italia on 2009-06-20
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -5,7 +5,7 @@ Francesco Fullone ff@ideato.it
|
||||
#PHPTestFest Cesena Italia on 2009-06-20
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -5,7 +5,7 @@ Francesco Fullone ff@ideato.it
|
||||
#PHPTestFest Cesena Italia on 2009-06-20
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||
?>
|
||||
--DESCRIPTION--
|
||||
the only way to test if a option is setten on a curl handle is using the curl_getinfo() function.
|
||||
|
||||
Binary file not shown.
@@ -3,7 +3,7 @@ CURL file uploading
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_multi_errno and curl_multi_strerror basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_multi_setopt basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_multi_strerror basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_share_errno and curl_share_strerror basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_share_setopt basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ curl_strerror basic test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("curl")) {
|
||||
exit("skip curl extension not loaded");
|
||||
exit("skip curl extension not loaded");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -3,7 +3,7 @@ strtotime() function
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!@putenv("TZ=EST5") || getenv("TZ") != 'EST5') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -5,10 +5,10 @@ date.timezone=US/Eastern
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
|
||||
die("skip. set TZ env is not supported at runtime.");
|
||||
die("skip. set TZ env is not supported at runtime.");
|
||||
}
|
||||
if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -5,7 +5,7 @@ date.timezone=GMT0
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -5,7 +5,7 @@ date.timezone=GMT0
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
date_default_timezone_get() function [1]
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
?>
|
||||
--INI--
|
||||
date.timezone=
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
date_default_timezone_get() function [2]
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
if(substr(PHP_OS, 0, 3) == 'WIN') die("skip on windows");
|
||||
?>
|
||||
--INI--
|
||||
date.timezone=
|
||||
|
||||
@@ -6,7 +6,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
|
||||
die("skip Test is not valid for Windows");
|
||||
}
|
||||
if(!setlocale(LC_ALL, "POSIX")) {
|
||||
die("skip Locale POSIX is needed by test and is not available");
|
||||
die("skip Locale POSIX is needed by test and is not available");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Bug #36436 (DBA problem with Berkeley DB4)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -26,7 +26,7 @@ dba_close($db);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
resource(%d) of type (dba persistent)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'cdb_make';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
$handler = 'cdb_make';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Bug #48240 (DBA Segmentation fault dba_nextkey)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -20,7 +20,7 @@ dba_close($db);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
Bug #49125 (Error in dba_exists C code)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
$handler = 'db4';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -24,7 +24,7 @@ dba_close($db);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -29,7 +29,7 @@ dba_close($db);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECT--
|
||||
integer
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Bug #72157 (use-after-free caused by dba_open)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA File Creation Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -18,7 +18,7 @@ DBA File Creation Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA Insert/Fetch Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -19,7 +19,7 @@ DBA Insert/Fetch Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA Insert/Replace/Fetch Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -21,7 +21,7 @@ DBA Insert/Replace/Fetch Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA Multiple Insert/Fetch Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -25,7 +25,7 @@ DBA Multiple Insert/Fetch Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA FirstKey/NextKey Loop Test With 5 Items
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -32,7 +32,7 @@ DBA FirstKey/NextKey Loop Test With 5 Items
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA FirstKey/NextKey with 2 deletes
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -34,7 +34,7 @@ DBA FirstKey/NextKey with 2 deletes
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
DBA Multiple File Creation Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
if (!function_exists('dba_list')) die('skip dba_list() not available');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
if (!function_exists('dba_list')) die('skip dba_list() not available');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -35,7 +35,7 @@ DBA Multiple File Creation Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA dba_popen Test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
print("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
print("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -26,7 +26,7 @@ DBA dba_popen Test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA with array keys
|
||||
--SKIPIF--
|
||||
<?php
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die("info $HND handler used");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -37,7 +37,7 @@ if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: %s
|
||||
|
||||
@@ -50,7 +50,7 @@ echo dba_fetch("key2", $db_file1), "\n";
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: flatfile
|
||||
|
||||
@@ -17,7 +17,7 @@ $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile');
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECTF--
|
||||
database handler: flatfile
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
DBA CDB handler test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'cdb';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die('info CDB does not support replace or delete');
|
||||
$handler = 'cdb';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die('info CDB does not support replace or delete');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -14,7 +14,7 @@ DBA CDB handler test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECT--
|
||||
database handler: cdb
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
DBA CDB_MAKE handler test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'cdb_make';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die('info CDB_MAKE does not support reading');
|
||||
$handler = 'cdb_make';
|
||||
require_once(__DIR__ .'/skipif.inc');
|
||||
die('info CDB_MAKE does not support reading');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
@@ -32,7 +32,7 @@ DBA CDB_MAKE handler test
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
require(__DIR__ .'/clean.inc');
|
||||
require(__DIR__ .'/clean.inc');
|
||||
?>
|
||||
--EXPECT--
|
||||
database handler: cdb_make
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA CDB handler test (read only)
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'cdb_make';
|
||||
require_once __DIR__ .'/skipif.inc';
|
||||
$handler = 'cdb_make';
|
||||
require_once __DIR__ .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
DBA DB1 handler test
|
||||
--SKIPIF--
|
||||
<?php
|
||||
$handler = 'db1';
|
||||
require_once __DIR__ .'/skipif.inc';
|
||||
$handler = 'db1';
|
||||
require_once __DIR__ .'/skipif.inc';
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user