];
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());
#[A1([V1 => V1])]
class C1
{
- public const BAR = 'bar';
+ public const BAR = 'bar';
}
$ref = new \ReflectionClass(C1::class);
#[A1(self::FOO, C1::BAR)]
class C3
{
- private const FOO = 'foo';
+ private const FOO = 'foo';
}
$ref = new \ReflectionClass(C3::class);
#[Attribute]
class C5
{
- public function __construct() { }
+ public function __construct() { }
}
$ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { });
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());
}
?>
#[Attribute(Attribute::TARGET_FUNCTION)]
class A1
{
- public string $name;
- public int $ttl;
-
- public function __construct(string $name, int $ttl = 50)
- {
- $this->name = $name;
- $this->ttl = $ttl;
- }
+ public string $name;
+ public int $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";
$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";
$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";
$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";
#[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";
$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";
$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());
}
?>
$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());
}
?>
#[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);
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);
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 { }
}));
?>
#[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);
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);
$attr = $ref->getMethod('foo')->getAttributes()[0];
try {
- $attr->getArguments();
+ $attr->getArguments();
} catch (\Error $e) {
var_dump('ERROR 1', $e->getMessage());
}
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());
class C1
{
- #[A1]
- public const A = 1, B = 2;
+ #[A1]
+ public const A = 1, B = 2;
}
?>
class C1
{
- #[A1]
- public $x, $y;
+ #[A1]
+ public $x, $y;
}
?>
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());
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";
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";
<?php
#[MyAttribute(
- "there",
- "are",
- "many",
- "arguments",
+ "there",
+ "are",
+ "many",
+ "arguments",
)]
class Foo { }
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
- die("skip Zend MM disabled");
+ die("skip Zend MM disabled");
}
?>
--FILE--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
- die("skip Zend MM disabled");
+ die("skip Zend MM disabled");
}
?>
--FILE--
--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");
--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",
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
- die("skip Zend MM disabled");
+ die("skip Zend MM disabled");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("pdo_sqlite")) {
- die("skip pdo_sqlite required");
+ die("skip pdo_sqlite required");
}
?>
--FILE--
<?php
$zend_mm_enabled = getenv("USE_ZEND_ALLOC");
if ($zend_mm_enabled === "0") {
- die("skip Zend MM disabled");
+ die("skip Zend MM disabled");
}
?>
--FILE--
--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--
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']));
--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
--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
<?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());
--FILE--
<?php
class Foo {
- function __set(\Countable $name, $value) {}
+ function __set(\Countable $name, $value) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __get(int $name) {}
+ function __get(int $name) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __isset(\stdClass $name) {}
+ function __isset(\stdClass $name) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __unset(array $name) {}
+ function __unset(array $name) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __call(int $name, array $arguments) {}
+ function __call(int $name, array $arguments) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __call(string $name, \Arguments $arguments) {}
+ function __call(string $name, \Arguments $arguments) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- static function __callStatic(int $name, array $arguments) {}
+ static function __callStatic(int $name, array $arguments) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- static function __callStatic(string $name, \Arguments $args) {}
+ static function __callStatic(string $name, \Arguments $args) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- public function __unserialize(string $name) {}
+ public function __unserialize(string $name) {}
}
?>
--EXPECTF--
<?php
class Foo {
- public static function __set_state(int $properties) {}
+ public static function __set_state(int $properties) {}
}
?>
--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!';
--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--
--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--
--FILE--
<?php
class Foo {
- public function __sleep(string $name) {}
+ public function __sleep(string $name) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- public function __wakeup(string $name) {}
+ public function __wakeup(string $name) {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __set($name, $value) : string {}
+ function __set($name, $value) : string {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __isset($name) : \stdClass|bool {}
+ function __isset($name) : \stdClass|bool {}
}
?>
--EXPECTF--
--FILE--
<?php
class Foo {
- function __unset($name) : bool {}
+ function __unset($name) : bool {}
}
?>
--EXPECTF--
OBJ_RELEASE(&parent->std);
/* Reset for resuming in finally */
generator->node.parent = NULL;
- generator->node.ptr.root = generator;
+ generator->node.ptr.root = generator;
}
}
$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt");
if (file_exists($fpath)) {
- unlink($fpath);
+ unlink($fpath);
}
?>
--EXPECT--
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());
}
?>
$fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx");
if (file_exists($fpath)) {
- unlink($fpath);
+ unlink($fpath);
}
?>
--EXPECT--
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
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
<?php
if (!extension_loaded('curl')) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
<?php
if (!extension_loaded('curl')) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
?>
--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
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
<?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--
<?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--
<?php
if (!extension_loaded('curl')) {
- exit('skip curl extension not loaded');
+ exit('skip curl extension not loaded');
}
?>
<?php
class Test {
- public $prop = "value";
+ public $prop = "value";
}
$ch = curl_init();
--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");
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
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
<?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--
<?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--
#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
#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
#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.
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("curl")) {
- exit("skip curl extension not loaded");
+ exit("skip curl extension not loaded");
}
?>
--FILE--
--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--
--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--
--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--
--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--
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=
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=
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--
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
resource(%d) of type (dba persistent)
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
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
bool(false)
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
bool(true)
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
integer
Bug #72157 (use-after-free caused by dba_open)
--SKIPIF--
<?php
- require_once(__DIR__ .'/skipif.inc');
+ require_once(__DIR__ .'/skipif.inc');
?>
--FILE--
<?php
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: %s
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: flatfile
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: flatfile
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: cdb
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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: cdb_make
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
DBA DB1 handler test
--SKIPIF--
<?php
- $handler = 'db1';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'db1';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
DBA DB2 handler test
--SKIPIF--
<?php
- $handler = 'db2';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'db2';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
DBA DB3 handler test
--SKIPIF--
<?php
- $handler = 'db3';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'db3';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--XFAIL--
Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278
DBA DBM handler test
--SKIPIF--
<?php
- $handler = 'dbm';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'dbm';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: dbm
DBA FlatFile handler test
--SKIPIF--
<?php
- $handler = 'flatfile';
- require_once(__DIR__ .'/skipif.inc');
+ $handler = 'flatfile';
+ require_once(__DIR__ .'/skipif.inc');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: flatfile
DBA GDBM handler test
--SKIPIF--
<?php
- $handler = 'gdbm';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'gdbm';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
DBA INIFILE handler test
--SKIPIF--
<?php
- $handler = 'inifile';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'inifile';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: inifile
DBA LMDB handler test
--SKIPIF--
<?php
- $handler = 'lmdb';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'lmdb';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once __DIR__ .'/clean.inc';
+ require_once __DIR__ .'/clean.inc';
?>
--EXPECTF--
database handler: lmdb
DBA NDBM handler test
--SKIPIF--
<?php
- $handler = 'ndbm';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'ndbm';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
DBA Optimize 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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: flatfile
DBA QDBM handler test
--SKIPIF--
<?php
- $handler = 'qdbm';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'qdbm';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECTF--
database handler: qdbm
DBA Split 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
DBA Sync 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
?>
--CLEAN--
<?php
- require(__DIR__ .'/clean.inc');
+ require(__DIR__ .'/clean.inc');
?>
--EXPECT--
database handler: flatfile
DBA TCADB handler test
--SKIPIF--
<?php
- $handler = 'tcadb';
- require_once __DIR__ .'/skipif.inc';
+ $handler = 'tcadb';
+ require_once __DIR__ .'/skipif.inc';
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- $temp_filename = __DIR__."/DomDocument_save_basic.tmp";
- unlink($temp_filename);
+ $temp_filename = __DIR__."/DomDocument_save_basic.tmp";
+ unlink($temp_filename);
?>
--EXPECT--
Wrote: 72 bytes
--SKIPIF--
<?php
if (!extension_loaded('enchant')) {
- echo "skip: Enchant extension not enabled\n";
- exit;
+ echo "skip: Enchant extension not enabled\n";
+ exit;
}
$broker = enchant_broker_init();
if (!$broker) {
- echo "skip: Unable to init broker\n";
- exit;
+ echo "skip: Unable to init broker\n";
+ exit;
}
if (!enchant_broker_describe($broker)) {
- @enchant_broker_free($broker);
+ @enchant_broker_free($broker);
- echo "skip: No broker providers found\n";
+ echo "skip: No broker providers found\n";
}
@enchant_broker_free($broker);
--SKIPIF--
<?php
if (!extension_loaded('enchant')) {
- echo "skip: Enchant extension not enabled\n";
- exit;
+ echo "skip: Enchant extension not enabled\n";
+ exit;
}
$broker = enchant_broker_init();
if (!$broker) {
- echo "skip: Unable to init broker\n";
- exit;
+ echo "skip: Unable to init broker\n";
+ exit;
}
if (!enchant_broker_list_dicts($broker)) {
- @enchant_broker_free($broker);
+ @enchant_broker_free($broker);
- echo "skip: No broker dicts installed\n";
+ echo "skip: No broker dicts installed\n";
}
@enchant_broker_free($broker);
--SKIPIF--
<?php
if (!extension_loaded('enchant')) {
- echo "skip: Enchant extension not enabled\n";
- exit;
+ echo "skip: Enchant extension not enabled\n";
+ exit;
}
$broker = enchant_broker_init();
if (!$broker) {
- echo "skip: Unable to init broker\n";
- exit;
+ echo "skip: Unable to init broker\n";
+ exit;
}
if (!enchant_broker_list_dicts($broker)) {
- @enchant_broker_free($broker);
+ @enchant_broker_free($broker);
- echo "skip: No broker dicts installed\n";
+ echo "skip: No broker dicts installed\n";
}
@enchant_broker_free($broker);
return start >= info->valid_start && end <= info->valid_end;
}
-#ifdef EXIF_DEBUG
+#ifdef EXIF_DEBUG
static inline int exif_offset_info_length(const exif_offset_info *info)
{
return info->valid_end - info->valid_start;
Check for exif_read_data, Unicode user comment
--SKIPIF--
<?php
- if (!extension_loaded('exif')) die('skip exif extension not available');
- if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
- if (!defined("EXIF_USE_MBSTRING") || !EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
+ if (!extension_loaded('exif')) die('skip exif extension not available');
+ if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
+ if (!defined("EXIF_USE_MBSTRING") || !EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
?>
--INI--
output_handler=
Check for exif_read_data, Unicode WinXP tags
--SKIPIF--
<?php
- if (!extension_loaded('exif')) die('skip exif extension not available');
- if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
- if (!defined("EXIF_USE_MBSTRING") || !EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
+ if (!extension_loaded('exif')) die('skip exif extension not available');
+ if (!extension_loaded('mbstring')) die('skip mbstring extension not available');
+ if (!defined("EXIF_USE_MBSTRING") || !EXIF_USE_MBSTRING) die ('skip mbstring loaded by dl');
?>
--INI--
output_handler=
<?php require_once('utils.inc'); ?>
<?php
try {
- ffi_cdef("extern void *zend_printf;", ffi_get_php_dll_name());
+ ffi_cdef("extern void *zend_printf;", ffi_get_php_dll_name());
} catch (Throwable $e) {
- die('skip PHP symbols not available');
+ die('skip PHP symbols not available');
}
?>
--INI--
<?php require_once('utils.inc'); ?>
<?php
try {
- ffi_cdef("extern void *zend_printf;", ffi_get_php_dll_name());
+ ffi_cdef("extern void *zend_printf;", ffi_get_php_dll_name());
} catch (Throwable $e) {
- die('skip PHP symbols not available');
+ die('skip PHP symbols not available');
}
?>
--INI--
<?php require_once('utils.inc'); ?>
<?php
try {
- FFI::cdef("void* zend_write;", ffi_get_php_dll_name());
+ FFI::cdef("void* zend_write;", ffi_get_php_dll_name());
} catch (Throwable $e) {
- die('skip PHP symbols not available');
+ die('skip PHP symbols not available');
}
?>
--INI--
<?php
require_once('skipif.inc');
try {
- $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
+ $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
} catch (Throwable $_) {
- die('skip libc.so.6 not available');
+ die('skip libc.so.6 not available');
}
?>
--INI--
require_once('skipif.inc');
require_once('utils.inc');
try {
- FFI::cdef("extern void *zend_printf;", ffi_get_php_dll_name());
+ FFI::cdef("extern void *zend_printf;", ffi_get_php_dll_name());
} catch (Throwable $_) {
- die('skip PHP symbols not available');
+ die('skip PHP symbols not available');
}
?>
--INI--
<?php
require_once('skipif.inc');
try {
- $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
+ $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
} catch (Throwable $_) {
- die('skip libc.so.6 not available');
+ die('skip libc.so.6 not available');
}
?>
--INI--
<?php
require_once('skipif.inc');
try {
- $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
+ $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
} catch (Throwable $_) {
- die('skip libc.so.6 not available');
+ die('skip libc.so.6 not available');
}
?>
--INI--
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
--SKIPIF--
<?php
- require_once(__DIR__ . '/skipif.inc');
+ require_once(__DIR__ . '/skipif.inc');
- if (ini_get("default_charset") != "UTF-8") {
- die("skip require default_charset == UTF-8");
- }
+ if (ini_get("default_charset") != "UTF-8") {
+ die("skip require default_charset == UTF-8");
+ }
?>
--FILE--
<?php
+++DONE+++
--CLEAN--
<?php
- $f_base = "67647私はガラスを食べられます.mov";
- $f = __DIR__ . DIRECTORY_SEPARATOR . $f_base;
- unlink($f);
+ $f_base = "67647私はガラスを食べられます.mov";
+ $f = __DIR__ . DIRECTORY_SEPARATOR . $f_base;
+ unlink($f);
?>
--EXPECT--
string(15) "video/quicktime"
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
$buffer = file_get_contents(__DIR__ . '/68731.gif');
?>
--CLEAN--
<?php
- $fname = __DIR__ . DIRECTORY_SEPARATOR . "bug69320.txt";
- unlink($fname);
+ $fname = __DIR__ . DIRECTORY_SEPARATOR . "bug69320.txt";
+ unlink($fname);
?>
--EXPECT--
string(10) "text/plain"
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--ENV--
USE_ZEND_ALLOC=0
--FILE--
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--ENV--
USE_ZEND_ALLOC=0
--FILE--
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (setlocale(LC_CTYPE, 'ru_RU.koi8r') === false)
- die('skip ru_RU.koi8r locale is not available');
+ die('skip ru_RU.koi8r locale is not available');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
$fd = __DIR__.'/cve-2014-1943私はガラスを食べられます.data';
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
$fd = __DIR__.'/cve-2014-1943.data';
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
if (getenv('SKIP_PERF_SENSITIVE'))
- die("skip performance sensitive test");
+ die("skip performance sensitive test");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (defined("PHP_DEBUG") && PHP_DEBUG)
- die("skip not suitable for debug build");
+ die("skip not suitable for debug build");
if (getenv('SKIP_PERF_SENSITIVE'))
die("skip performance sensitive test");
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
?>
--INI--
pcre.jit=0
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
if (getenv('SKIP_PERF_SENSITIVE'))
- die("skip performance sensitive test");
+ die("skip performance sensitive test");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!class_exists('finfo'))
- die('skip no fileinfo extension');
+ die('skip no fileinfo extension');
--FILE--
<?php
Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd))
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #22544 (TrueColor transparency in PNG images).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #22544 (TrueColor transparency in PNG images).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #24155 (gdImageRotate270 rotation problem).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
- if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
+ if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
Bug #24594 (Filling an area using tiles).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #28147 (Crash with anti-aliased line)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #36697 (TrueColor transparency with GIF palette output).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #36697 (TrueColor transparency with GIF palette output).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #37346 (gdimagecreatefromgif, bad colormap)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #37346 (gdimagecreatefromgif, bad colormap)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #37360 (gdimagecreatefromgif, bad image sizes)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #38112 (GIF Invalid Code size ).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #39082 (Output image to stdout segfaults).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #37360 (gdimagecreatefromgif, bad image sizes)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #39366 (imagerotate does not respect alpha with angles>45)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!function_exists("imagerotate")) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
Bug #39508 (imagefill crashes with small images 3 pixels or less)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #39780 (PNG image with CRC/data error raises a fatal error)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
Bug #39780 (PNG image with CRC/data error raises a fatal error)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (GD_BUNDLED) die("skip requires extern GD\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (GD_BUNDLED) die("skip requires extern GD\n");
?>
--FILE--
<?php
Bug #40764 (line thickness not respected for horizontal and vertical lines)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #41442 (imagegd2() under output control)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagegd2")) {
- die("skip GD2 support unavailable");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagegd2")) {
+ die("skip GD2 support unavailable");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('gd')) {
- die('skip gd extension not available');
+ die('skip gd extension not available');
}
?>
--FILE--
Bug #43073 (TrueType bounding box is wrong for angle<>0)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagettftext')) die('skip imagettftext() not available');
?>
--FILE--
<?php
Bug #43121 (gdImageFill with IMG_COLOR_TILED crashes httpd)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
- die("skip test requires GD 2.2.0 or higher");
- }
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.0', '<')) {
+ die("skip test requires GD 2.2.0 or higher");
+ }
?>
--FILE--
<?php
Bug #43475 (Thick styled lines have scrambled patterns)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
<?php
if (!extension_loaded('gd')) die('skip ext/gd not available');
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
Bug #44849 (imagecolorclosesthwb is not available on Windows)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
Bug #45799 (imagepng() crashes on empty image).
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #48555 (ImageFTBBox() differs from previous versions for texts with new lines)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
?>
--FILE--
<?php
Bug #48732 (TTF Bounding box wrong for letters below baseline)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagefttext')) die('skip imagefttext() not available');
- if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagefttext')) die('skip imagefttext() not available');
+ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
?>
--FILE--
<?php
Bug #48732 (TTF Bounding box wrong for letters below baseline)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagefttext')) die('skip imagefttext() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagefttext')) die('skip imagefttext() not available');
?>
--FILE--
<?php
Bug #48801 (Problem with imagettfbbox)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
- if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+ if (substr(PHP_OS, 0, 3) == 'WIN') die('skip UTF-8 font file names not yet supported on Windows');
?>
--FILE--
<?php
Bug #48801 (Problem with imagettfbbox)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
?>
--FILE--
<?php
Bug #49600 (imageTTFText text shifted right)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagettftext')) die('skip imagettftext() not available');
- if(!function_exists('imagettfbbox')) die('skip imagettfbbox() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+ if(!function_exists('imagettfbbox')) die('skip imagettfbbox() not available');
?>
--FILE--
<?php
Bug #51263 (imagettftext and rotated text uses wrong baseline)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagettftext')) die('skip imagettftext() not available');
?>
--FILE--
<?php
Bug #51671 (imagefill does not work correctly for small images)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
Bug #53504 imagettfbbox/imageftbbox gives incorrect values for bounding box
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imageftbbox')) die('skip imageftbbox() not available');
?>
--FILE--
<?php
Bug #60160 (imagefill does not work correctly for small images) @see bug51671
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
Bug #66356 (Heap Overflow Vulnerability in imagecrop())
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
Bug #67447 (imagecrop() adds a black line when cropping)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
Bug #70976 (Memory Read via gdImageRotateInterpolated Array Index Out of Bounds)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
Bug #71952 (Corruption inside imageaffinematrixget)
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
?>
--FILE--
<?php
Bug #72227: imagescale out-of-bounds read
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
Bug #72298: pass2_no_dither out-of-bounds access
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
<?php
if (!function_exists("imagecreatefromgd2")) print "skip";
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd))
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 0
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
Bug #72512 gdImageTrueColorToPaletteBody allows arbitrary write/read access, var 1
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
Test max colors for a gd image.
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available\n");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available\n");
+ }
?>
--FILE--
<?php
imagecreatefromwbmp with invalid wbmp
--SKIPIF--
<?php
- if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
imagecreatefromwbmp with invalid wbmp
--SKIPIF--
<?php
- if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
- if (GD_BUNDLED) die("skip requires extern GD\n");
+ if (!function_exists('imagecreatefromwbmp')) die("skip gd extension not available\n");
+ if (GD_BUNDLED) die("skip requires extern GD\n");
?>
--FILE--
<?php
gd_info()
--SKIPIF--
<?php
- if (!function_exists('gd_info')) {
- die('skip gd_info() not available');
- }
+ if (!function_exists('gd_info')) {
+ die('skip gd_info() not available');
+ }
?>
--FILE--
<?php
gif in/out
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagegif") || !function_exists("imagecreatefromgif") || !function_exists('imagecreatefromjpeg')) {
- die("skip gif support unavailable");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagegif") || !function_exists("imagecreatefromgif") || !function_exists('imagecreatefromjpeg')) {
+ die("skip gif support unavailable");
+ }
?>
--FILE--
<?php
gif --> gd1/gd2 conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefromgif")) {
- die("skip gif read support unavailable");
- }
+ if (!function_exists("imagecreatefromgif")) {
+ die("skip gif read support unavailable");
+ }
?>
--FILE--
<?php
gif --> jpeg conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagejpeg")) {
- die("skip jpeg support unavailable");
- }
- if (!function_exists("imagecreatefromgif")) {
- die("skip gif read support unavailable");
- }
+ if (!function_exists("imagejpeg")) {
+ die("skip jpeg support unavailable");
+ }
+ if (!function_exists("imagecreatefromgif")) {
+ die("skip gif read support unavailable");
+ }
?>
--FILE--
<?php
gif --> png conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagepng")) {
- die("skip png support unavailable");
- }
- if (!function_exists("imagecreatefromgif")) {
- die("skip gif read support unavailable");
- }
+ if (!function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
+ if (!function_exists("imagecreatefromgif")) {
+ die("skip gif read support unavailable");
+ }
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
+ die('skip gd extension is not loaded');
}
?>
--FILE--
Felix De Vliegher <felix.devliegher@gmail.com>
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagecolorstotal")) {
- die("skip imagecolorstotal() not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagecolorstotal")) {
+ die("skip imagecolorstotal() not available.");
+ }
?>
--FILE--
<?php
imagecopyresampled()
--SKIPIF--
<?php
- if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
+ if (!function_exists('imagecopyresampled')) die('skip imagecopyresampled() not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- $dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
- $dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';
- @unlink($dest_lge);
- @unlink($dest_sml);
+ $dest_lge = dirname(realpath(__FILE__)) . '/imagelarge.png';
+ $dest_sml = dirname(realpath(__FILE__)) . '/imagesmall.png';
+ @unlink($dest_lge);
+ @unlink($dest_sml);
?>
--EXPECT--
Simple test of imagecopyresampled() function
Testing imagecreate(): error on out of bound parameters
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreate")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreate")) die("skip GD Version not compatible");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
imagedashedline()
--SKIPIF--
<?php
- if (!function_exists('imagedashedline')) die('skip imagedashedline() not available');
+ if (!function_exists('imagedashedline')) die('skip imagedashedline() not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- $dest = dirname(realpath(__FILE__)) . '/imagedashedline.png';
- @unlink($dest);
+ $dest = dirname(realpath(__FILE__)) . '/imagedashedline.png';
+ @unlink($dest);
?>
--EXPECT--
Simple test of imagedashedline() function
imagefill() infinite loop with wrong color index
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagefttext")) {
- die("skip imagefttext() not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagefttext")) {
+ die("skip imagefttext() not available.");
+ }
?>
--FILE--
<?php
<?php
if (!extension_loaded("gd")) die("skip GD not present");
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
<?php
if (!extension_loaded("gd")) die("skip GD not present");
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
<?php
if (!extension_loaded("gd")) die("skip GD not present");
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
+ die("skip test requires GD 2.2.2 or higher");
}
?>
--FILE--
imagefilledpolygon()
--SKIPIF--
<?php
- if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
+ if (!function_exists('imagefilledpolygon')) die('skip imagefilledpolygon() not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- $dest = dirname(realpath(__FILE__)) . '/imagefilledpolygon.png';
- @unlink($dest);
+ $dest = dirname(realpath(__FILE__)) . '/imagefilledpolygon.png';
+ @unlink($dest);
?>
--EXPECT--
Simple test of imagefilledpolygon() function
imagefilter() function test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagefilter")) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagefilter")) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
imagefttext() function test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagefttext")) {
- die("skip imagefttext() not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagefttext")) {
+ die("skip imagefttext() not available.");
+ }
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
$support = gd_info();
if (!isset($support['JPEG Support']) || $support['JPEG Support'] === false) {
- print 'skip jpeg support not available';
+ print 'skip jpeg support not available';
}
?>
--FILE--
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected');
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected');
?>
--FILE--
<?php
Austin Drouare <austin.drouare [at] gmail [dot] com> #testfest #tek11
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
imageloadfont() function crashes
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
$support = gd_info();
if (!isset($support['PNG Support']) || $support['PNG Support'] === false) {
- print 'skip png support not available';
+ print 'skip png support not available';
}
?>
--FILE--
imagepolygon()
--SKIPIF--
<?php
- if (!function_exists('imagepolygon')) die('skip imagepolygon() not available');
+ if (!function_exists('imagepolygon')) die('skip imagepolygon() not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- $dest = dirname(realpath(__FILE__)) . '/imagepolygon.png';
- @unlink($dest);
+ $dest = dirname(realpath(__FILE__)) . '/imagepolygon.png';
+ @unlink($dest);
?>
--EXPECT--
Simple test of imagepolygon() function
imagerotate() overflow with negative numbers
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists('imagerotate')) {
- die("skip imagerotate() not available.");
- }
+ if (!function_exists('imagerotate')) {
+ die("skip imagerotate() not available.");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('gd')) {
- die('skip gd extension is not loaded');
+ die('skip gd extension is not loaded');
}
?>
--FILE--
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
#testfest PHPSP on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
+ if (!extension_loaded("gd")) die("skip GD not present");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
- die("skip test requires GD 2.2.2 or higher");
- }
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.2', '<')) {
+ die("skip test requires GD 2.2.2 or higher");
+ }
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
Rafael Dohms <rdohms [at] gmail [dot] com>
--SKIPIF--
<?php
- if (!extension_loaded("gd")) die("skip GD not present");
- if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
+ if (!extension_loaded("gd")) die("skip GD not present");
+ if (!function_exists("imagecreatetruecolor")) die("skip GD Version not compatible");
?>
--FILE--
<?php
Font charmap order is deterministic based on order in the font, use the selected encoding
--SKIPIF--
<?php
- if(!extension_loaded('gd')){ die('skip gd extension not available'); }
- if(!function_exists('imagettftext')) die('skip imagettftext() not available');
+ if(!extension_loaded('gd')){ die('skip gd extension not available'); }
+ if(!function_exists('imagettftext')) die('skip imagettftext() not available');
if(gd_info()['JIS-mapped Japanese Font Support']) die('skip JIS-mapped Japanese Font Support not supported');
?>
--FILE--
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
$support = gd_info();
if (!isset($support['WBMP Support']) || $support['WBMP Support'] === false) {
- print 'skip wbmp support not available';
+ print 'skip wbmp support not available';
}
?>
--FILE--
if(!extension_loaded('gd')){ die('skip gd extension not available'); }
$support = gd_info();
if (!isset($support['WebP Support']) || $support['WebP Support'] === false) {
- print 'skip webp support not available';
+ print 'skip webp support not available';
}
?>
--FILE--
jpeg <--> png conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
- die("skip png support unavailable");
- }
- if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
- die("skip jpeg support unavailable");
- }
+ if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
+ if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
+ die("skip jpeg support unavailable");
+ }
?>
--FILE--
<?php
jpeg <--> gd1/gd2 conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
- die("skip jpeg support unavailable");
- }
+ if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
+ die("skip jpeg support unavailable");
+ }
?>
--FILE--
<?php
jpeg <--> gd1/gd2 conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
- die("skip jpeg support unavailable");
- }
+ if (!function_exists("imagecreatefromjpeg") || !function_exists("imagejpeg")) {
+ die("skip jpeg support unavailable");
+ }
?>
--FILE--
<?php
libgd #86 (Possible infinite loop in imagecreatefrompng)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
libgd #86 (Possible infinite loop in imagecreatefrompng)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (GD_BUNDLED) die("skip requires external GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (GD_BUNDLED) die("skip requires external GD library\n");
?>
--FILE--
<?php
libgd #94 (imagecreatefromxbm can crash if gdImageCreate fails)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
libgd #94 (imagecreatefromxbm can crash if gdImageCreate fails)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
libgd #100 (spurious horizontal line drawn by gdImageFilledPolygon)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
libgd #101 (imagecreatefromgd can crash if gdImageCreate fails)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
libgd #106 (imagerectangle 1x1 draws 1x3)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
libgd #186 (Tiling true colour with palette image does not work)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
libgd FS#191 (A circle becomes square)
--SKIPIF--
<?php
- if (!extension_loaded('gd')) die("skip gd extension not available\n");
- if (!GD_BUNDLED) die("skip requires bundled GD library\n");
+ if (!extension_loaded('gd')) die("skip gd extension not available\n");
+ if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
png <--> gd1/gd2 conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
- die("skip png support unavailable");
- }
+ if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
?>
--FILE--
<?php
png compression test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
- die("skip png support unavailable");
- }
+ if (!function_exists("imagecreatefrompng") || !function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
?>
--FILE--
<?php
xbm --> png conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
- if (!function_exists("imagepng")) {
- die("skip png support unavailable");
- }
- if (!function_exists("imagecreatefromxbm")) {
- die("skip xbm read support unavailable");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
+ if (!function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
+ if (!function_exists("imagecreatefromxbm")) {
+ die("skip xbm read support unavailable");
+ }
?>
--FILE--
<?php
xpm --> gd1/gd2 conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagecreatefromxpm")) {
- die("skip xpm read support unavailable");
- }
+ if (!function_exists("imagecreatefromxpm")) {
+ die("skip xpm read support unavailable");
+ }
?>
--FILE--
<?php
xpm --> jpeg conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagejpeg")) {
- die("skip jpeg support unavailable");
- }
- if (!function_exists("imagecreatefromxpm")) {
- die("skip xpm read support unavailable");
- }
+ if (!function_exists("imagejpeg")) {
+ die("skip jpeg support unavailable");
+ }
+ if (!function_exists("imagecreatefromxpm")) {
+ die("skip xpm read support unavailable");
+ }
?>
--FILE--
<?php
xpm --> png conversion test
--SKIPIF--
<?php
- if (!extension_loaded('gd')) {
- die("skip gd extension not available.");
- }
+ if (!extension_loaded('gd')) {
+ die("skip gd extension not available.");
+ }
- if (!function_exists("imagepng")) {
- die("skip png support unavailable");
- }
- if (!function_exists("imagecreatefromxpm")) {
- die("skip xpm read support unavailable");
- }
+ if (!function_exists("imagepng")) {
+ die("skip png support unavailable");
+ }
+ if (!function_exists("imagecreatefromxpm")) {
+ die("skip xpm read support unavailable");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded("gettext")) {
- die("skip\n");
+ die("skip\n");
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded("gettext")) {
- die("skip\n");
+ die("skip\n");
}
if (PHP_ZTS) {
- /* this is supposed to fail on the TS build at least on Windows,
- should be even XFAIL till it's fixed there */
- die("skip NTS only");
+ /* this is supposed to fail on the TS build at least on Windows,
+ should be even XFAIL till it's fixed there */
+ die("skip NTS only");
}
if (substr(PHP_OS, 0, 3) != 'WIN') {
- $loc = ["de_DE", "fr_FR", "en_US"];
- foreach($loc as $l) {
- if (!setlocale(LC_ALL, $l)) {
- die("SKIP '$l' locale not supported.");
- }
- }
+ $loc = ["de_DE", "fr_FR", "en_US"];
+ foreach($loc as $l) {
+ if (!setlocale(LC_ALL, $l)) {
+ die("SKIP '$l' locale not supported.");
+ }
+ }
}
?>
--FILE--
Gettext basic test with en_US locale that should be on nearly every system
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("skip\n");
- }
- if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
- die("skip en_US.UTF-8 locale not supported.");
- }
+ if (!extension_loaded("gettext")) {
+ die("skip\n");
+ }
+ if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
+ die("skip en_US.UTF-8 locale not supported.");
+ }
?>
--FILE--
<?php
Gettext basic test
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("skip\n");
- }
- if (!setlocale(LC_ALL, 'fi_FI')) {
- die("skip fi_FI locale not supported.");
- }
+ if (!extension_loaded("gettext")) {
+ die("skip\n");
+ }
+ if (!setlocale(LC_ALL, 'fi_FI')) {
+ die("skip fi_FI locale not supported.");
+ }
?>
--FILE--
<?php
test if bind_textdomain_codeset() returns correct value
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("skip");
- }
+ if (!extension_loaded("gettext")) {
+ die("skip");
+ }
?>
--FILE--
<?php
Test ngettext() functionality
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("SKIP extension gettext not loaded\n");
- }
- if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
- die("SKIP en_US.UTF-8 locale not supported.");
- }
+ if (!extension_loaded("gettext")) {
+ die("SKIP extension gettext not loaded\n");
+ }
+ if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
+ die("SKIP en_US.UTF-8 locale not supported.");
+ }
?>
--FILE--
<?php
Test phpinfo() displays gettext support
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("SKIP extension gettext not loaded\n");
- }
+ if (!extension_loaded("gettext")) {
+ die("SKIP extension gettext not loaded\n");
+ }
?>
--FILE--
<?php
Check if textdomain() returns the new domain
--SKIPIF--
<?php
- if (!extension_loaded("gettext")) {
- die("skip\n");
- }
- if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
- die("skip en_US.UTF-8 locale not supported.");
- }
+ if (!extension_loaded("gettext")) {
+ die("skip\n");
+ }
+ if (!setlocale(LC_ALL, 'en_US.UTF-8')) {
+ die("skip en_US.UTF-8 locale not supported.");
+ }
?>
--FILE--
<?php
<?php
if (!extension_loaded("gmp")) die ("skip");
if (!defined('GMP_VERSION') || version_compare("4.2.1", GMP_VERSION, ">=")) {
- die("skip your GMP is too old and will crash");
+ die("skip your GMP is too old and will crash");
}
?>
--FILE--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
<?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); ?>
<?php
- /* This test requires about 8G RAM which likely not to be present on an arbitrary CI. */
- if (!file_exists("/proc/meminfo")) {
- die("skip cannot determine free memory amount.");
- }
- $s = file_get_contents("/proc/meminfo");
- $free = 0;
- if (preg_match(",MemFree:\s+(\d+)\s+kB,", $s, $m)) {
- /* Got amount in kb. */
- $free = $m[1]/1024/1024;
- }
- if ($free < 8) {
- die("skip not enough free RAM.");
- }
+ /* This test requires about 8G RAM which likely not to be present on an arbitrary CI. */
+ if (!file_exists("/proc/meminfo")) {
+ die("skip cannot determine free memory amount.");
+ }
+ $s = file_get_contents("/proc/meminfo");
+ $free = 0;
+ if (preg_match(",MemFree:\s+(\d+)\s+kB,", $s, $m)) {
+ /* Got amount in kb. */
+ $free = $m[1]/1024/1024;
+ }
+ if ($free < 8) {
+ die("skip not enough free RAM.");
+ }
?>
--FILE--
<?php
$test = @iconv_strpos("abbttt","ttt",0,"UTF-8");
if ($test === false) {
- die("skip UTF-8 is not supported?");
+ die("skip UTF-8 is not supported?");
}
?>
$test = @iconv_strpos("abbttt","ttt",0,"UTF-8");
if ($test === false) {
- die("skip UTF-8 is not supported?");
+ die("skip UTF-8 is not supported?");
}
?>
<?php
include('skipif.inc');
if (@iconv("ascii","UCS-4LE", "abcd") == '') {
- die("skip conversion to UCS-4LE not supported");
+ die("skip conversion to UCS-4LE not supported");
}
?>
--INI--
Bug #45705 test #1 (imap rfc822_parse_adrlist() modifies passed address parameter)
--SKIPIF--
<?php
- if (!extension_loaded("imap")) {
- die("skip imap extension not available");
- }
+ if (!extension_loaded("imap")) {
+ die("skip imap extension not available");
+ }
?>
--FILE--
<?php
Bug #45705 test #2 (imap rfc822_parse_adrlist() modifies passed address parameter)
--SKIPIF--
<?php
- if (!extension_loaded("imap")) {
- die("skip imap extension not available");
- }
+ if (!extension_loaded("imap")) {
+ die("skip imap extension not available");
+ }
?>
--FILE--
<?php
Bug #77153 (imap_open allows to run arbitrary shell commands via mailbox parameter)
--SKIPIF--
<?php
- if (!extension_loaded("imap")) {
- die("skip imap extension not available");
+ if (!extension_loaded("imap")) {
+ die("skip imap extension not available");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') > 0) die('skip for ICU <= 57.1');
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.default_locale", "pt_PT");
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') > 0) die('skip for ICU <= 57.1');
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '57.1') <= 0) die('skip for ICU >= 58.1');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '51.2') >= 0)
- die('skip for ICU < 51.2');
+ die('skip for ICU < 51.2');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '51.2') < 0)
- die('skip for ICU >= 51.2');
+ die('skip for ICU >= 51.2');
?>
--FILE--
<?php
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
- if (!extension_loaded('intl')) { die('skip intl extension not available'); }
+ if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
- if (!extension_loaded('intl')) { die('skip intl extension not available'); }
+ if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
- if (!extension_loaded('intl')) { die('skip intl extension not available'); }
+ if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
- if (!extension_loaded('intl')) { die('skip intl extension not available'); }
+ if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php
Bug #60192 (SegFault when Collator not constructed properly)
--SKIPIF--
<?php
- if (!extension_loaded('intl')) { die('skip intl extension not available'); }
+ if (!extension_loaded('intl')) { die('skip intl extension not available'); }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set('intl.error_level', E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set('intl.error_level', E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
var_dump(locale_get_display_name(str_repeat("a", 300), null));
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
$arr1 = array();
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (!class_exists('Spoofchecker'))
- die('skip intl extension does not have spoof checker');
+ die('skip intl extension does not have spoof checker');
--FILE--
<?php
class A extends IntlDateFormatter {
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
var_dump(IntlCalendar::FIELD_FIELD_COUNT);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '52.1') >= 0)
- die('skip for ICU < 52.1');
+ die('skip for ICU < 52.1');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
if (version_compare(INTL_ICU_VERSION, '52.1') < 0)
- die('skip for ICU >= 52.1');
+ die('skip for ICU >= 52.1');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
$c = new IntlGregorianCalendar(NULL, 'pt_PT');
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
IDN UTS #46 API basic tests
--SKIPIF--
<?php
- if (!extension_loaded('intl'))
- die('skip');
- if (!defined('INTL_IDNA_VARIANT_UTS46'))
- die('skip no UTS #46 API');
+ if (!extension_loaded('intl'))
+ die('skip');
+ if (!defined('INTL_IDNA_VARIANT_UTS46'))
+ die('skip no UTS #46 API');
--FILE--
<?php
$utf8dn = "www.fußball.com";
IDN UTS #46 API error tests
--SKIPIF--
<?php
- if (!extension_loaded('intl'))
- die('skip');
- if (!defined('INTL_IDNA_VARIANT_UTS46'))
- die('skip no UTS #46 API');
+ if (!extension_loaded('intl'))
+ die('skip');
+ if (!defined('INTL_IDNA_VARIANT_UTS46'))
+ die('skip no UTS #46 API');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.default_locale", "pt_PT");
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php if(!extension_loaded('intl') || !class_exists("Spoofchecker")) print 'skip'; ?>
<?php
- $r = new ReflectionClass("SpoofChecker");
- if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) {
- die("skip Incompatible ICU version");
- }
+ $r = new ReflectionClass("SpoofChecker");
+ if (false === $r->getConstant("SINGLE_SCRIPT_RESTRICTIVE")) {
+ die("skip Incompatible ICU version");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled'); ?>
+ die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52') < 0)die('skip for ICU >= 52'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled'); ?>
+ die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '58.1') < 0) die('skip for ICU >= 58.1'); ?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
/* INF being an invalid offset depends on UB in float->int cast behavior. */
$arch = php_uname('m');
if ($arch != 'x86_64' && $arch != 'i386')
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
/* INF being an invalid offset depends on UB in float->int cast behavior. */
$arch = php_uname('m');
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled');
+ die('skip intl extension not enabled');
--FILE--
<?php
ini_set("intl.error_level", E_WARNING);
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled'); ?>
+ die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '52') < 0)die('skip for ICU >= 52'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '58.1') >= 0) die('skip for ICU <= 57.1'); ?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('intl'))
- die('skip intl extension not enabled'); ?>
+ die('skip intl extension not enabled'); ?>
<?php if (version_compare(INTL_ICU_VERSION, '58.1') < 0) die('skip for ICU >= 58.1'); ?>
--FILE--
<?php
--SKIPIF--
<?php
if (setlocale(LC_NUMERIC, "de_DE") === false) {
- die("skip no de_DE locale");
+ die("skip no de_DE locale");
}
?>
--INI--
--SKIPIF--
<?php
if (!setlocale(LC_CTYPE, "de_DE", "de", "german", "ge", "de_DE.ISO8859-1", "ISO8859-1")) {
- die("skip locale needed for this test is not supported on this platform");
+ die("skip locale needed for this test is not supported on this platform");
}
?>
--FILE--
<?php require_once('skipif.inc'); ?>
<?php require_once('skipifbindfailure.inc'); ?>
<?php
- $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
- $r = ldap_read($link, '', 'objectClass=*', array('dynamicsubtrees'));
- $info = ldap_get_entries($link, $r)[0];
- if (!isset($info['dynamicsubtrees'])) {
- die("skip Overlay DDS not available");
- }
+ $link = ldap_connect_and_bind($host, $port, $user, $passwd, $protocol_version);
+ $r = ldap_read($link, '', 'objectClass=*', array('dynamicsubtrees'));
+ $info = ldap_get_entries($link, $r)[0];
+ if (!isset($info['dynamicsubtrees'])) {
+ die("skip Overlay DDS not available");
+ }
?>
--FILE--
<?php
Edwin Hoksberg <edwin@edwinhoksberg.nl>
--SKIPIF--
<?php
- require_once __DIR__ .'/skipif.inc';
- require_once __DIR__ .'/skipifbindfailure.inc';
+ require_once __DIR__ .'/skipif.inc';
+ require_once __DIR__ .'/skipifbindfailure.inc';
?>
--FILE--
<?php
Edwin Hoksberg <edwin@edwinhoksberg.nl>
--SKIPIF--
<?php
- require_once __DIR__ .'/skipif.inc';
- require_once __DIR__ .'/skipifbindfailure.inc';
+ require_once __DIR__ .'/skipif.inc';
+ require_once __DIR__ .'/skipifbindfailure.inc';
?>
--FILE--
<?php
<?php require_once('skipif.inc'); ?>
<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?>
<?php
- require "connect.inc";
- $link = @fsockopen($host, $port);
- if (!$link) {
- die("skip no server listening");
- }
+ require "connect.inc";
+ $link = @fsockopen($host, $port);
+ if (!$link) {
+ die("skip no server listening");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php
- require "connect.inc";
- $link = ldap_connect($host, $port);
- ldap_get_option($link, LDAP_OPT_X_TLS_PACKAGE, $package);
- if ($package != 'OpenSSL') {
- die("skip OpenSSL required for CRL check options, got: $package");
- }
+ require "connect.inc";
+ $link = ldap_connect($host, $port);
+ ldap_get_option($link, LDAP_OPT_X_TLS_PACKAGE, $package);
+ if ($package != 'OpenSSL') {
+ die("skip OpenSSL required for CRL check options, got: $package");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php require_once('skipif.inc'); ?>
<?php
- if (!function_exists("ldap_set_rebind_proc")) {
- die("skip ldap_set_rebind_proc() does not exist");
- }
- require "connect.inc";
- $link = @fsockopen($host, $port);
- if (!$link) {
- die("skip no server listening");
- }
+ if (!function_exists("ldap_set_rebind_proc")) {
+ die("skip ldap_set_rebind_proc() does not exist");
+ }
+ require "connect.inc";
+ $link = @fsockopen($host, $port);
+ if (!$link) {
+ die("skip no server listening");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
?>
--INI--
HTML input/output
--SKIPIF--
<?php
- ini_set('include_path', __DIR__);
- extension_loaded('mbstring') or die('skip mbstring not available');
+ ini_set('include_path', __DIR__);
+ extension_loaded('mbstring') or die('skip mbstring not available');
?>
--INI--
output_buffering=4096
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("neutral")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("japanese")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("english")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("german")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Simplified Chinese")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
if (!@mb_internal_encoding('GB2312')) {
- die("skip GB2312 encoding is not available on this platform");
+ die("skip GB2312 encoding is not available on this platform");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Traditional Chinese")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
if (!@mb_internal_encoding('BIG5')) {
- die("skip BIG5 encoding is not available on this platform");
+ die("skip BIG5 encoding is not available on this platform");
}
?>
--INI--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!function_exists("mb_send_mail") || !mb_language("Korean")) {
- die("skip mb_send_mail() not available");
+ die("skip mb_send_mail() not available");
}
if (!@mb_internal_encoding('ISO-2022-KR')) {
- die("skip ISO-2022-KR encoding is not available on this platform");
+ die("skip ISO-2022-KR encoding is not available on this platform");
}
?>
--INI--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
mysqli fetch bigint values (ok to fail with 4.1.x)
--SKIPIF--
<?php
- if (PHP_INT_SIZE == 8) {
- echo 'skip test valid only for 32bit systems';
- exit;
- }
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ if (PHP_INT_SIZE == 8) {
+ echo 'skip test valid only for 32bit systems';
+ exit;
+ }
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch_uint"))
- printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
mysqli autocommit/commit/rollback
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once("connect.inc");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once("connect.inc");
- $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
- if (!$link)
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+ if (!$link)
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
- if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ if (!have_innodb($link))
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
Num_of_rows=1
mysqli autocommit/commit/rollback with innodb
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- require_once('connect.inc');
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ require_once('connect.inc');
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
- if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ if (!have_innodb($link))
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
array(2) {
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS insert_read"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS general_test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS general_test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
function test: mysqli_insert_id()
--SKIPIF--
<?php
- if (PHP_INT_SIZE == 8) {
- echo 'skip test valid only for 32bit systems';
- exit;
- }
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ if (PHP_INT_SIZE == 8) {
+ echo 'skip test valid only for 32bit systems';
+ exit;
+ }
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS t036"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_warnings"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_update"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
mysqli_stmt_bind_result (SHOW)
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- require_once("connect.inc");
- $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
+ require_once("connect.inc");
+ $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
- $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
- mysqli_stmt_execute($stmt);
+ $stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
+ mysqli_stmt_execute($stmt);
- if (!$stmt->field_count) {
- printf("skip SHOW command is not supported in prepared statements.");
- }
- $stmt->close();
- mysqli_close($link);
+ if (!$stmt->field_count) {
+ printf("skip SHOW command is not supported in prepared statements.");
+ }
+ $stmt->close();
+ mysqli_close($link);
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_affected"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_affected"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch_null"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_store_result"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS mbind"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS mbind"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_local_infile_handler'))
- die("skip - function not available.");
+ die("skip - function not available.");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$link)
- die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
include_once("local_infile_tools.inc");
if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
mysqli_close($link);
?>
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset')) {
- die('skip mysqli_set_charset() not available');
+ die('skip mysqli_set_charset() not available');
}
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_warnings"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
function test: nested selects (cursors)
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once("connect.inc");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once("connect.inc");
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to check required version");
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die("skip Cannot connect to check required version");
- /* skip cursor test for server versions < 50009 */
- if (mysqli_get_server_version($link) < 50009) {
- die(sprintf("skip Server doesn't support cursors (%s)",
- mysqli_get_server_version($link)));
- }
- mysqli_close($link);
+ /* skip cursor test for server versions < 50009 */
+ if (mysqli_get_server_version($link) < 50009) {
+ die(sprintf("skip Server doesn't support cursors (%s)",
+ mysqli_get_server_version($link)));
+ }
+ mysqli_close($link);
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
for ($i =0; $i < 3; $i++) {
- if (!mysqli_query($link, sprintf("DROP TABLE IF EXISTS cursor%d", $i)))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ if (!mysqli_query($link, sprintf("DROP TABLE IF EXISTS cursor%d", $i)))
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
mysqli_close($link);
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_users"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_warnings"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bint") || !mysqli_query($link, "DROP TABLE IF EXISTS test_buint"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS temp"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS my_time"))
- printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset')) {
- die('skip mysqli_set_charset() not available');
+ die('skip mysqli_set_charset() not available');
}
?>
--FILE--
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50000) {
- die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
require_once('skipif.inc');
if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
- die("skip: only available in mysqlnd");
+ die("skip: only available in mysqlnd");
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50000) {
- die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_query($link, "DROP PROCEDURE IF EXISTS p");
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
[004] [%s
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!defined("MYSQLI_ASYNC")) {
- die("skip mysqlnd only");
+ die("skip mysqlnd only");
}
?>
--FILE--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!defined("MYSQLI_ASYNC")) {
- die("skip mysqlnd only");
+ die("skip mysqlnd only");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
array(1) {
$link = mysqli_init();
if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
}
include_once("local_infile_tools.inc");
if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
mysqli_close($link);
?>
die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
if ($IS_MYSQLND && !extension_loaded("openssl"))
- die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
+ die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
- die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (false === strpos($link->host_info, 'TCP/IP'))
- die(sprintf("skip SSL only supported on TCP/IP"));
+ die(sprintf("skip SSL only supported on TCP/IP"));
$row = NULL;
if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
- $row = $res->fetch_row();
+ $row = $res->fetch_row();
} else {
- if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
- while ($row = $res->fetch_row())
- if ($row[0] == 'have_ssl')
- break;
- } else {
- die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
- }
+ if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
+ while ($row = $res->fetch_row())
+ if ($row[0] == 'have_ssl')
+ break;
+ } else {
+ die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
+ }
}
if (empty($row))
- die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
- die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
$link->close();
?>
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND) {
- die("skip: test applies only to mysqlnd");
+ die("skip: test applies only to mysqlnd");
}
?>
--FILE--
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
+ printf("[clean] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
}
if (!mysqli_query($link, 'DROP TABLE IF EXISTS tuint')) {
- printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
if (!mysqli_query($link, 'DROP TABLE IF EXISTS tsint')) {
- printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
mysqli_close($link);
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
+ die("skip Cannot connect to MySQL");
include_once("local_infile_tools.inc");
if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
mysqli_close($link);
die("skip Requires MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT");
if ($IS_MYSQLND && !extension_loaded("openssl"))
- die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
+ die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn.");
if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)))
- die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (false === strpos($link->host_info, 'TCP/IP'))
- die(sprintf("skip SSL only supported on TCP/IP"));
+ die(sprintf("skip SSL only supported on TCP/IP"));
$row = NULL;
if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) {
- $row = $res->fetch_row();
+ $row = $res->fetch_row();
} else {
- if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
- while ($row = $res->fetch_row())
- if ($row[0] == 'have_ssl')
- break;
- } else {
- die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
- }
+ if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) {
+ while ($row = $res->fetch_row())
+ if ($row[0] == 'have_ssl')
+ break;
+ } else {
+ die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
+ }
}
if (empty($row))
- die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error));
if (($row[1] == 'NO') || ($row[1] == 'DISABLED'))
- die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error));
$link->close();
?>
mysqli_float_handling - ensure 4 byte float is handled correctly
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--INI--
precision=5
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND) {
- die("skip: test applies only to mysqlnd");
+ die("skip: test applies only to mysqlnd");
}
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to MySQL");
+ die("skip Cannot connect to MySQL");
include_once("local_infile_tools.inc");
if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
mysqli_close($link);
?>
require_once __DIR__ . '/skipifconnectfailure.inc';
require_once __DIR__ . '/connect.inc';
if (!$IS_MYSQLND) {
- die('skip mysqlnd only');
+ die('skip mysqlnd only');
}
?>
--FILE--
mysqli_float_handling - ensure 4 byte float is handled correctly
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- if (@$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- if ($link->server_version < 50709) {
- die("skip MySQL 5.7.9+ needed. Found [".
- intval(substr($link->server_version."", -5, 1)).
- ".".
- intval(substr($link->server_version."", -4, 2)).
- ".".
- intval(substr($link->server_version."", -2, 2)).
- "]");
- }
- }
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ if (@$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ if ($link->server_version < 50709) {
+ die("skip MySQL 5.7.9+ needed. Found [".
+ intval(substr($link->server_version."", -5, 1)).
+ ".".
+ intval(substr($link->server_version."", -4, 2)).
+ ".".
+ intval(substr($link->server_version."", -2, 2)).
+ "]");
+ }
+ }
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
OK
require_once('skipifconnectfailure.inc');
require_once("connect.inc");
if (!$IS_MYSQLND) {
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
}
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS bug70949"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
require_once('skipifconnectfailure.inc');
require_once("connect.inc");
if (!$IS_MYSQLND) {
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
}
?>
--FILE--
require_once("connect.inc");
if ("127.0.0.1" != $host && "localhost" != $host) {
- die("skip require 127.0.0.1 connection");
+ die("skip require 127.0.0.1 connection");
}
?>
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to check required version");
+ die("skip Cannot connect to check required version");
/* Fractional seconds are supported with servers >= 5.6.4. */
if (mysqli_get_server_version($link) < 50604) {
- die(sprintf("skip Server doesn't support fractional seconds in timestamp (%s)", mysqli_get_server_version($link)));
+ die(sprintf("skip Server doesn't support fractional seconds in timestamp (%s)", mysqli_get_server_version($link)));
}
mysqli_close($link);
?>
$link = mysqli_init();
if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
}
require_once('local_infile_tools.inc');
if ($msg = check_local_infile_support($link, $engine))
- die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
?>
--INI--
?>\r
--CLEAN--\r
<?php\r
- require_once("clean_table.inc");\r
+ require_once("clean_table.inc");\r
?>\r
--EXPECT--\r
bool(false)\r
mysqli_affected_rows()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
mysqli->affected_rows
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
Property access is not allowed yet
require_once('connect.inc');
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
}
if ($link->server_version < 50500)
- die(sprintf("SKIP Needs MySQL 5.5 or newer, found MySQL %s\n", $link->server_info));
+ die(sprintf("SKIP Needs MySQL 5.5 or newer, found MySQL %s\n", $link->server_info));
if (!$res = $link->query("SHOW PLUGINS"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
$have_pam = false;
while ($row = $res->fetch_assoc()) {
- if (isset($row['Name']) && ('mysql_clear_password' == $row['Name'])) {
- $have_pam = true;
- break;
- }
+ if (isset($row['Name']) && ('mysql_clear_password' == $row['Name'])) {
+ $have_pam = true;
+ break;
+ }
}
$res->close();
mysqli_query($link, 'DROP USER pamtest@localhost');
if (!mysqli_query($link, 'CREATE USER pamtest@"%" IDENTIFIED WITH mysql_clear_password') ||
- !mysqli_query($link, 'CREATE USER pamtest@"localhost" IDENTIFIED WITH mysql_clear_password')) {
- printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip CREATE USER failed");
+ !mysqli_query($link, 'CREATE USER pamtest@"localhost" IDENTIFIED WITH mysql_clear_password')) {
+ printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip CREATE USER failed");
}
if (!$link->query("CREATE TABLE test (id INT)") || !$link->query("INSERT INTO test(id) VALUES (1)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pamtest@'%%'", $db)) ||
- !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pamtest@'localhost'", $db))) {
- printf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip GRANT failed");
+ !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pamtest@'localhost'", $db))) {
+ printf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip GRANT failed");
}
?>
--INI--
mysqli_autocommit()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('connect.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('connect.inc');
+ require_once('skipifconnectfailure.inc');
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
- }
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
+ }
- if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ if (!have_innodb($link))
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
print "done!";
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
mysqli->autocommit()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once('connect.inc');
-
- if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
- printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket);
- exit(1);
- }
-
- if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once('connect.inc');
+
+ if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) {
+ printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket);
+ exit(1);
+ }
+
+ if (!have_innodb($link))
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
my_mysqli object is already closed
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
NULL
require_once('connect.inc');
if (!$IS_MYSQLND) {
- die("skip Might hit known and open bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184");
+ die("skip Might hit known and open bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
if (mysqli_get_server_version($link) < 50600)
- die("SKIP For MySQL >= 5.6.0");
+ die("SKIP For MySQL >= 5.6.0");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
if (mysqli_get_server_version($link) >= 50600)
- die("SKIP For MySQL < 5.6.0");
+ die("SKIP For MySQL < 5.6.0");
?>
--FILE--
<?php
require_once('table.inc');
if (!$IS_MYSQLND && (mysqli_get_server_version($link) < 50118 && mysqli_get_server_version($link) > 50100)) {
- die("skip Your MySQL Server version has a known bug that will cause a crash");
+ die("skip Your MySQL Server version has a known bug that will cause a crash");
}
if (mysqli_get_server_version($link) >= 50600)
- die("SKIP For MySQL < 5.6.0");
+ die("SKIP For MySQL < 5.6.0");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
- die(sprintf("skip [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
+ die(sprintf("skip [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
$tmp = mysqli_fetch_assoc($res);
mysqli_free_result($res);
$version = explode('.', $tmp['server_version']);
if (empty($version))
- die(sprintf("skip Cannot determine server version, we need MySQL Server 4.1+ for the test!"));
+ die(sprintf("skip Cannot determine server version, we need MySQL Server 4.1+ for the test!"));
if ($version[0] <= 4 && $version[1] < 1)
- die(sprintf("skip We need MySQL Server 4.1+ for the test!"));
+ die(sprintf("skip We need MySQL Server 4.1+ for the test!"));
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset')) {
- die('skip mysqli_set_charset() not available');
+ die('skip mysqli_set_charset() not available');
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
mysqli_chararcter_set_name(), mysql_client_encoding() [alias]
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
Interface of the class mysqli_stmt
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once('connect.inc');
if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
+ die("skip - experimental (= unsupported) feature");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
print "done!";
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli object is not fully initialized
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip: test applies only to mysqlnd");
+ die("skip: test applies only to mysqlnd");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to the server");
+ die("skip Cannot connect to the server");
/* skip test if the server version does not have session_connect_attrs table yet*/
if (!$res = mysqli_query($link, "select count(*) as count from information_schema.tables where table_schema='performance_schema' and table_name='session_connect_attrs';"))
new mysqli()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- if (!get_current_user())
- die('skip: get_current_user() not supported');
- if (stristr(mysqli_get_client_info(), 'mysqlnd'))
- die("skip: test for libmysql (different error output when using php streams");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ if (!get_current_user())
+ die('skip: get_current_user() not supported');
+ if (stristr(mysqli_get_client_info(), 'mysqlnd'))
+ die("skip: test for libmysql (different error output when using php streams");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_data_seek(): Argument #2 ($offset) must be greater than or equal to 0
print "done!";
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_result object is already closed
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_debug'))
- die("skip: mysqli_debug() not available");
+ die("skip: mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
done%s
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_debug'))
- die("skip: mysqli_debug() not available");
+ die("skip: mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
if (!$IS_MYSQLND)
- die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
+ die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test is not for Windows platforms");
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
done%s
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_debug'))
- die("skip: mysqli_debug() not available");
+ die("skip: mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
if (!$IS_MYSQLND)
- die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
+ die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_debug'))
- die("skip mysqli_debug() not available");
+ die("skip mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
require_once('connect.inc');
if (!$IS_MYSQLND)
- die("skip needs mysqlnd");
+ die("skip needs mysqlnd");
if (!$fp = @fopen('/tmp/mysqli_debug_phpt.trace', 'w'))
- die("skip PHP cannot create a file in /tmp/mysqli_debug_phpt");
+ die("skip PHP cannot create a file in /tmp/mysqli_debug_phpt");
else
- fclose($fp);
+ fclose($fp);
@unlink("/tmp/mysqli_debug_phpt.trace");
?>
--INI--
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_debug'))
- die("skip: mysqli_debug() not available");
+ die("skip: mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
if (!$IS_MYSQLND)
- die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
+ die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
[083][control string 'n:O,%smysqli_debug_phpt.trace'] Trace file has not been written.
require_once('connect.inc');
if (!function_exists('mysqli_debug'))
- die("skip mysqli_debug() not available");
+ die("skip mysqli_debug() not available");
if (!defined('MYSQLI_DEBUG_TRACE_ENABLED'))
- die("skip: can't say for sure if mysqli_debug works");
+ die("skip: can't say for sure if mysqli_debug works");
if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
- die("skip: debug functionality not enabled");
+ die("skip: debug functionality not enabled");
if (!$IS_MYSQLND)
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_disable_reads_from_master')) {
- die("skip mysqli_disable_reads_from_master() not available");
+ die("skip mysqli_disable_reads_from_master() not available");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: mysqli_disable_reads_from_master(): mysqli object is already closed in %s on line %d
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_enable_reads_from_master')) {
- die("skip function mysqli_enable_reads_from_master() not available\n");
+ die("skip function mysqli_enable_reads_from_master() not available\n");
}
?>
--FILE--
require_once('connect.inc');
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
}
if ($link->server_version < 50610)
- die(sprintf("SKIP Needs MySQL 5.6.10 or newer, found MySQL %s\n", $link->server_info));
+ die(sprintf("SKIP Needs MySQL 5.6.10 or newer, found MySQL %s\n", $link->server_info));
if (!$IS_MYSQLND && (mysqli_get_client_version() < 50610)) {
- die(sprintf("SKIP Needs libmysql 5.6.10 or newer, found %s\n", mysqli_get_client_version()));
+ die(sprintf("SKIP Needs libmysql 5.6.10 or newer, found %s\n", mysqli_get_client_version()));
}
mysqli_query($link, 'DROP USER expiretest');
mysqli_query($link, 'DROP USER expiretest@localhost');
if (!mysqli_query($link, 'CREATE USER expiretest@"%"') ||
- !mysqli_query($link, 'CREATE USER expiretest@"localhost"')) {
- printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip CREATE USER failed");
+ !mysqli_query($link, 'CREATE USER expiretest@"localhost"')) {
+ printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip CREATE USER failed");
}
if (!mysqli_query($link, 'ALTER USER expiretest@"%" PASSWORD EXPIRE') ||
- !mysqli_query($link, 'ALTER USER expiretest@"localhost" PASSWORD EXPIRE')) {
- printf("skip Cannot modify second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip ALTER USER failed");
+ !mysqli_query($link, 'ALTER USER expiretest@"localhost" PASSWORD EXPIRE')) {
+ printf("skip Cannot modify second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip ALTER USER failed");
}
if (!$link->query("DROP TABLE IF EXISTS test") ||
- !$link->query("CREATE TABLE test (id INT)") || !$link->query("INSERT INTO test(id) VALUES (1)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ !$link->query("CREATE TABLE test (id INT)") || !$link->query("INSERT INTO test(id) VALUES (1)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO expiretest@'%%'", $db)) ||
- !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO expiretest@'localhost'", $db))) {
- printf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip GRANT failed");
+ !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO expiretest@'localhost'", $db))) {
+ printf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip GRANT failed");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
- mysqli_query($link, 'DROP USER expiretest');
- mysqli_query($link, 'DROP USER expiretest@localhost');
+ require_once("clean_table.inc");
+ mysqli_query($link, 'DROP USER expiretest');
+ mysqli_query($link, 'DROP USER expiretest@localhost');
?>
--EXPECTF--
Warning: mysqli%sconnect(): (HY000/1862): %s in %s on line %d
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_fetch_all'))
- die("skip: function only available with mysqlnd");
+ die("skip: function only available with mysqlnd");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- // require_once("clean_table.inc");
+ // require_once("clean_table.inc");
?>
--EXPECT--
[005]
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_fetch_all'))
- die("skip: function only available with mysqlnd");
+ die("skip: function only available with mysqlnd");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
[005]
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
[002]
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
[005]
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
[005]
mysqli_fetch_assoc() - BIT
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- require_once('connect.inc');
- require_once('table.inc');
- if (mysqli_get_server_version($link) < 50003)
- // b'001' syntax not supported before 5.0.3
- die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
+ require_once('connect.inc');
+ require_once('table.inc');
+ if (mysqli_get_server_version($link) < 50003)
+ // b'001' syntax not supported before 5.0.3
+ die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
mysqli_fetch_assoc() - utf8
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once("connect.inc");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once("connect.inc");
- if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip Cannot connect to server to check charsets");
+ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die("skip Cannot connect to server to check charsets");
- if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UTF8'"))
- die("skip Cannot run SHOW CHARACTER SET to check charsets");
+ if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UTF8'"))
+ die("skip Cannot run SHOW CHARACTER SET to check charsets");
- if (!$tmp = mysqli_fetch_assoc($res))
- die("skip Looks like UTF8 is not available on the server");
+ if (!$tmp = mysqli_fetch_assoc($res))
+ die("skip Looks like UTF8 is not available on the server");
- if (strtolower($tmp['Charset']) !== 'utf8')
- die("skip Not sure if UTF8 is available, canceling the test");
+ if (strtolower($tmp['Charset']) !== 'utf8')
+ die("skip Not sure if UTF8 is available, canceling the test");
- mysqli_free_result($res);
+ mysqli_free_result($res);
- if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UCS2'"))
- die("skip Cannot run SHOW CHARACTER SET to check charsets");
+ if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'UCS2'"))
+ die("skip Cannot run SHOW CHARACTER SET to check charsets");
- if (!$tmp = mysqli_fetch_assoc($res))
- die("skip Looks like UCS2 is not available on the server");
+ if (!$tmp = mysqli_fetch_assoc($res))
+ die("skip Looks like UCS2 is not available on the server");
- if (strtolower($tmp['Charset']) !== 'ucs2')
- die("skip Not sure if UCS2 is available, canceling the test");
+ if (strtolower($tmp['Charset']) !== 'ucs2')
+ die("skip Not sure if UCS2 is available, canceling the test");
- mysqli_free_result($res);
- mysqli_close($link);
+ mysqli_free_result($res);
+ mysqli_close($link);
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
object(stdClass)#%d (13) {
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_fetch_field_direct(): Argument #2 ($offset) must be greater than or equal to 0
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli object is not fully initialized
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
if (mysqli_get_server_version($link) < 50041)
- die("skip: Due to many MySQL Server differences, the test requires 5.0.41+");
+ die("skip: Due to many MySQL Server differences, the test requires 5.0.41+");
mysqli_close($link);
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
object(stdClass)#%d (13) {
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(false)
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
NULL
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
No exception with PHP:
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
%s(6) "object"
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
[004]
print "done!";
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
int(0)
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
int(0)
require_once('skipifconnectfailure.inc');
if (!function_exists('pcntl_fork'))
- die("skip Process Control Functions not available");
+ die("skip Process Control Functions not available");
if (!function_exists('posix_getpid'))
- die("skip POSIX functions not available");
+ die("skip POSIX functions not available");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, "DROP TABLE IF EXISTS messages"))
- printf("[c003] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c003] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
a
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_charset'))
- die("skip: function not available");
+ die("skip: function not available");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_client_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--INI--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_client_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--INI--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_client_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--INI--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_client_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--INI--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_client_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--FILE--
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_connection_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_get_connection_stats')) {
- die("skip only available with mysqlnd");
+ die("skip only available with mysqlnd");
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
+ die("skip - experimental (= unsupported) feature");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_insert_id_var"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("SKIP [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("SKIP [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
$max_len = pow(2, 24);
if (!$res = mysqli_query($link, "SHOW GLOBAL VARIABLES LIKE 'max_allowed_packet'"))
- die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
+ die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
if (!mysqli_query($link, "SET NAMES 'latin1'"))
- die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
+ die(sprintf("SKIP [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
mysqli_close($link);
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_kill(): Argument #2 ($connection_id) must be greater than 0
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
API: %d, SQL: %d
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
[004]
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
[006] 3
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$IS_MYSQLND)
- /* The libmysql read_timeout limit default is 365 * 24 * 3600 seconds. It cannot be altered through PHP API calls */
- die("skip mysqlnd only test");
+ /* The libmysql read_timeout limit default is 365 * 24 * 3600 seconds. It cannot be altered through PHP API calls */
+ die("skip mysqlnd only test");
?>
--INI--
default_socket_timeout=60
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND) {
- die("skip: test applies only to mysqlnd");
+ die("skip: test applies only to mysqlnd");
}
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50011) {
- die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
}
?>
--INI--
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND) {
- die("skip: test applies only to mysqlnd");
+ die("skip: test applies only to mysqlnd");
}
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50011) {
- die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
}
?>
--INI--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_result object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_result object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: mysqli_real_connect(): (%s/%d): %s in %s on line %d
require_once('connect.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
$tmp = ob_get_contents();
ob_end_clean();
if (!stristr($tmp, "auth_plugin_sha256_password"))
- die("skip SHA256 auth plugin not built-in to mysqlnd");
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
if (mysqli_get_server_version($link) < 50606)
- die("skip: SHA-256 requires MySQL 5.6.6+");
+ die("skip: SHA-256 requires MySQL 5.6.6+");
if (!($res = $link->query("SHOW PLUGINS"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
$found = false;
while ($row = $res->fetch_assoc()) {
- if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
- $found = true;
- break;
- }
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
}
if (!$found)
- die("skip SHA-256 server plugin unavailable");
+ die("skip SHA-256 server plugin unavailable");
if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
if (!($row = $res->fetch_assoc())) {
- die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
}
if (strlen($row['Value']) < 100) {
- die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
}
if (!$link->query("SET @@session.old_passwords=2")) {
- die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
}
$link->query('DROP USER shatest');
if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
- !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
- die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
- !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
- die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query("DROP TABLE IF EXISTS test") ||
- !$link->query("CREATE TABLE test (id INT)") ||
- !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
- !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
- die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
}
$link->close();
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
- $link->query('DROP USER shatest');
- $link->query('DROP USER shatest@localhost');
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
?>
--EXPECT--
done!
$tmp = ob_get_contents();
ob_end_clean();
if (!stristr($tmp, "auth_plugin_sha256_password"))
- die("skip SHA256 auth plugin not built-in to mysqlnd");
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
if (mysqli_get_server_version($link) < 50606)
- die("skip: SHA-256 requires MySQL 5.6.6+");
+ die("skip: SHA-256 requires MySQL 5.6.6+");
if (!($res = $link->query("SHOW PLUGINS"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
$found = false;
while ($row = $res->fetch_assoc()) {
- if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
- $found = true;
- break;
- }
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
}
if (!$found)
- die("skip SHA-256 server plugin unavailable");
+ die("skip SHA-256 server plugin unavailable");
if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
if (!($row = $res->fetch_assoc())) {
- die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
}
$key = $row['Value'];
if (strlen($key) < 100) {
- die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
}
/* date changes may give false positive */
$file = "test_sha256_ini";
if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
- die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
}
$key = str_replace("A", "a", $key);
$key = str_replace("M", "m", $key);
if (strlen($key) != fwrite($fp, $key)) {
- die(sprintf("skip Failed to create pub key file"));
+ die(sprintf("skip Failed to create pub key file"));
}
if (!$link->query("SET @@session.old_passwords=2")) {
- die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
}
$link->query('DROP USER shatest');
if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
- !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
- die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
- !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
- die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query("DROP TABLE IF EXISTS test") ||
- !$link->query("CREATE TABLE test (id INT)") ||
- !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
- !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
- die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
}
$link->close();
$tmp = ob_get_contents();
ob_end_clean();
if (!stristr($tmp, "auth_plugin_sha256_password"))
- die("skip SHA256 auth plugin not built-in to mysqlnd");
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
if (mysqli_get_server_version($link) < 50606)
- die("skip: SHA-256 requires MySQL 5.6.6+");
+ die("skip: SHA-256 requires MySQL 5.6.6+");
if (!($res = $link->query("SHOW PLUGINS"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
$found = false;
while ($row = $res->fetch_assoc()) {
- if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
- $found = true;
- break;
- }
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
}
if (!$found)
- die("skip SHA-256 server plugin unavailable");
+ die("skip SHA-256 server plugin unavailable");
if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
if (!($row = $res->fetch_assoc())) {
- die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
}
if (strlen($row['Value']) < 100) {
- die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
}
/* date changes may give false positive */
$file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
- die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
}
if (strlen($row['Value']) != fwrite($fp, $row['Value'])) {
- die(sprintf("skip Failed to create pub key file"));
+ die(sprintf("skip Failed to create pub key file"));
}
if (!$link->query("SET @@session.old_passwords=2")) {
- die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
}
$link->query('DROP USER shatest');
if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
- !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
- die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
- !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
- die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query("DROP TABLE IF EXISTS test") ||
- !$link->query("CREATE TABLE test (id INT)") ||
- !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
- !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
- die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
}
$link->close();
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
- $link->query('DROP USER shatest');
- $link->query('DROP USER shatest@localhost');
- $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
- @unlink($file);
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ @unlink($file);
?>
--EXPECT--
done!
$tmp = ob_get_contents();
ob_end_clean();
if (!stristr($tmp, "auth_plugin_sha256_password"))
- die("skip SHA256 auth plugin not built-in to mysqlnd");
+ die("skip SHA256 auth plugin not built-in to mysqlnd");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
+ die(printf("skip: [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()));
if (mysqli_get_server_version($link) < 50606)
- die("skip: SHA-256 requires MySQL 5.6.6+");
+ die("skip: SHA-256 requires MySQL 5.6.6+");
if (!($res = $link->query("SHOW PLUGINS"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
$found = false;
while ($row = $res->fetch_assoc()) {
- if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
- $found = true;
- break;
- }
+ if (($row['Name'] == 'sha256_password') && ($row['Status'] == 'ACTIVE')) {
+ $found = true;
+ break;
+ }
}
if (!$found)
- die("skip SHA-256 server plugin unavailable");
+ die("skip SHA-256 server plugin unavailable");
if (!($res = $link->query("SHOW STATUS LIKE 'Rsa_public_key'"))) {
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
}
if (!($row = $res->fetch_assoc())) {
- die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Failed to check RSA pub key, [%d] %s\n", $link->errno, $link->error));
}
if (strlen($row['Value']) < 100) {
- die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
+ die(sprintf("skip Server misconfiguration? RSA pub key is suspicious, [%d] %s\n", $link->errno, $link->error));
}
/* date changes may give false positive */
$file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
if ((file_exists($file) && !unlink($file)) || !($fp = @fopen($file, "w"))) {
- die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
+ die(sprintf("skip Cannot create RSA pub key file '%s'", $file));
}
if (strlen($row['Value']) != fwrite($fp, $row['Value'])) {
- die(sprintf("skip Failed to create pub key file"));
+ die(sprintf("skip Failed to create pub key file"));
}
if (!$link->query("SET @@session.old_passwords=2")) {
- die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Cannot set @@session.old_passwords=2 [%d] %s", $link->errno, $link->error));
}
$link->query('DROP USER shatest');
if (!$link->query('CREATE USER shatest@"%" IDENTIFIED WITH sha256_password') ||
- !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
- die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
+ !$link->query('CREATE USER shatest@"localhost" IDENTIFIED WITH sha256_password')) {
+ die(sprintf("skip CREATE USER failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query('SET PASSWORD FOR shatest@"%" = PASSWORD("shatest")') ||
- !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
- die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
+ !$link->query('SET PASSWORD FOR shatest@"localhost" = PASSWORD("shatest")')) {
+ die(sprintf("skip SET PASSWORD failed [%d] %s", $link->errno, $link->error));
}
if (!$link->query("DROP TABLE IF EXISTS test") ||
- !$link->query("CREATE TABLE test (id INT)") ||
- !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
- die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
+ !$link->query("CREATE TABLE test (id INT)") ||
+ !$link->query("INSERT INTO test(id) VALUES (1), (2), (3)"))
+ die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
if (!$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'%%'", $db)) ||
- !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
- die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
+ !$link->query(sprintf("GRANT SELECT ON TABLE %s.test TO shatest@'localhost'", $db))) {
+ die(sprintf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link)));
}
$link->close();
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
- $link->query('DROP USER shatest');
- $link->query('DROP USER shatest@localhost');
- $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
- @unlink($file);
- $file_wrong = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_wrong" , @date("Ymd"));
- @unlink($file_wrong);
+ require_once("clean_table.inc");
+ $link->query('DROP USER shatest');
+ $link->query('DROP USER shatest@localhost');
+ $file = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_" , @date("Ymd"));
+ @unlink($file);
+ $file_wrong = sprintf("%s%s%s_%s", sys_get_temp_dir(), DIRECTORY_SEPARATOR, "test_sha256_wrong" , @date("Ymd"));
+ @unlink($file_wrong);
?>
--EXPECTF--
Warning: mysqli::real_connect(): (HY000/1045): %s in %s on line %d
Persistent connections and mysqli.max_links
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once('table.inc');
-
- mysqli_query($link, 'DROP USER pcontest');
- mysqli_query($link, 'DROP USER pcontest@localhost');
-
- if (!mysqli_query($link, 'CREATE USER pcontest@"%" IDENTIFIED BY "pcontest"') ||
- !mysqli_query($link, 'CREATE USER pcontest@localhost IDENTIFIED BY "pcontest"')) {
- printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_close($link);
- die("skip CREATE USER failed");
- }
-
- // we might be able to specify the host using CURRENT_USER(), but...
- if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'%%'", $db)) ||
- !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'localhost'", $db))) {
- printf("skip Cannot GRANT SELECT to second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
- mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest');
- mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@localhost');
- mysqli_query($link, 'DROP USER pcontest@localhost');
- mysqli_query($link, 'DROP USER pcontest');
- mysqli_close($link);
- die("skip GRANT failed");
- }
-
- if (!($link_pcontest = @my_mysqli_connect($host, 'pcontest', 'pcontest', $db, $port, $socket))) {
- mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest');
- mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@localhost');
- mysqli_query($link, 'DROP USER pcontest@localhost');
- mysqli_query($link, 'DROP USER pcontest');
- mysqli_close($link);
- die("skip CONNECT using new user failed");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once('table.inc');
+
+ mysqli_query($link, 'DROP USER pcontest');
+ mysqli_query($link, 'DROP USER pcontest@localhost');
+
+ if (!mysqli_query($link, 'CREATE USER pcontest@"%" IDENTIFIED BY "pcontest"') ||
+ !mysqli_query($link, 'CREATE USER pcontest@localhost IDENTIFIED BY "pcontest"')) {
+ printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_close($link);
+ die("skip CREATE USER failed");
+ }
+
+ // we might be able to specify the host using CURRENT_USER(), but...
+ if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'%%'", $db)) ||
+ !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pcontest@'localhost'", $db))) {
+ printf("skip Cannot GRANT SELECT to second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
+ mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest');
+ mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@localhost');
+ mysqli_query($link, 'DROP USER pcontest@localhost');
+ mysqli_query($link, 'DROP USER pcontest');
+ mysqli_close($link);
+ die("skip GRANT failed");
}
- mysqli_close($link);
+
+ if (!($link_pcontest = @my_mysqli_connect($host, 'pcontest', 'pcontest', $db, $port, $socket))) {
+ mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest');
+ mysqli_query($link, 'REVOKE ALL PRIVILEGES, GRANT OPTION FROM pcontest@localhost');
+ mysqli_query($link, 'DROP USER pcontest@localhost');
+ mysqli_query($link, 'DROP USER pcontest');
+ mysqli_close($link);
+ die("skip CONNECT using new user failed");
+ }
+ mysqli_close($link);
?>
--INI--
mysqli.allow_persistent=1
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
+ die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
+ die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
+ die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
?>
--FILE--
<?php
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, "DROP TABLE IF EXISTS bogus"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_query($link, "DROP PROCEDURE IF EXISTS p");
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
+ die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die("skip cannot connect");
+ die("skip cannot connect");
if (mysqli_get_server_version($link) < 50012)
- die("skip Test needs SQL function SLEEP() available as of MySQL 5.0.12");
+ die("skip Test needs SQL function SLEEP() available as of MySQL 5.0.12");
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
if (!mysqli_query($link, "DROP TABLE IF EXISTS test2"))
- printf("[c003] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c003] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@mysqli_query($link, "DROP FUNCTION IF EXISTS f");
@mysqli_query($link, 'DROP PROCEDURE IF EXISTS p');
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
--- Testing default ---
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50000) {
- die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@mysqli_query($link, "DROP PROCEDURE IS EXISTS p");
require_once('connect.inc');
require_once('table.inc');
if (!$res = mysqli_query($link, "SHOW CHARACTER SET LIKE 'utf8'"))
- die("skip UTF8 chatset seems not available");
+ die("skip UTF8 chatset seems not available");
mysqli_free_result($res);
mysqli_close($link);
?>
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
?>
--INI--
mysqli.allow_local_infile=1
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'big5'))
- die(sprintf("skip Cannot set charset 'big5'"));
+ die(sprintf("skip Cannot set charset 'big5'"));
mysqli_close($link);
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(true)
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'eucjpms'))
- die(sprintf("skip Cannot set charset 'eucjpms'"));
+ die(sprintf("skip Cannot set charset 'eucjpms'"));
mysqli_close($link);
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(true)
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'euckr'))
- die(sprintf("skip Cannot set charset 'euckr'"));
+ die(sprintf("skip Cannot set charset 'euckr'"));
mysqli_close($link);
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(true)
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'gb2312'))
- die(sprintf("skip Cannot set charset 'gb2312'"));
+ die(sprintf("skip Cannot set charset 'gb2312'"));
mysqli_close($link);
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(true)
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'gbk'))
- die(sprintf("skip Cannot set charset 'gbk'"));
+ die(sprintf("skip Cannot set charset 'gbk'"));
mysqli_close($link);
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
bool(true)
require_once('connect.inc');
if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
- mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect to MySQL, [%d] %s\n",
+ mysqli_connect_errno(), mysqli_connect_error()));
}
if (!mysqli_set_charset($link, 'sjis'))
- die(sprintf("skip Cannot set charset 'sjis'"));
+ die(sprintf("skip Cannot set charset 'sjis'"));
mysqli_close($link);
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@mysqli_query($link, "DROP PROCEDURE IF EXISTS p");
@mysqli_query($link, "DROP FUNCTION IF EXISTS f");
require_once('skipifconnectfailure.inc');
if (!$IS_MYSQLND)
- die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
+ die("skip mysqlnd only feature, compile PHP using --with-mysqli=mysqlnd");
?>
--FILE--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (stristr(mysqli_get_client_info(), 'mysqlnd'))
- die("skip: test for libmysql");
+ die("skip: test for libmysql");
?>
--INI--
mysqli.reconnect=1
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_release_savepoint(): Argument #2 ($name) cannot be empty
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
if (mysqli_get_server_version($link) < 50600)
- die("SKIP For MySQL >= 5.6.0");
+ die("SKIP For MySQL >= 5.6.0");
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
if (mysqli_get_server_version($link) >= 50600)
- die("SKIP For MySQL < 5.6.0");
+ die("SKIP For MySQL < 5.6.0");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your %s server version for the right syntax to use near 'BAR; FOO' at line 1 in %s on line %d
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
array(7) refcount(2){
require_once('connect.inc');
if (!$IS_MYSQLND)
- die("skip Test for mysqlnd only");
+ die("skip Test for mysqlnd only");
require_once('skipifemb.inc'); ?>
--FILE--
<?php
mysqli_rollback()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- require_once('connect.inc');
- if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ require_once('connect.inc');
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
- if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ if (!have_innodb($link))
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!have_innodb($link))
- die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
+ die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_savepoint(): Argument #2 ($name) cannot be empty
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_send_query')) {
- die("skip mysqli_send_query() not available");
+ die("skip mysqli_send_query() not available");
}
require_once('connect.inc');
if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
+ die("skip - experimental (= unsupported) feature");
?>
--FILE--
<?php
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset'))
- die("skip Function not available");
+ die("skip Function not available");
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
- die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf("skip Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
if (!($res = mysqli_query($link, 'SELECT version() AS server_version')) ||
- !($tmp = mysqli_fetch_assoc($res))) {
- mysqli_close($link);
- die(sprintf("skip Cannot check server version, [%d] %s\n",
- mysqli_errno($link), mysqli_error($link)));
+ !($tmp = mysqli_fetch_assoc($res))) {
+ mysqli_close($link);
+ die(sprintf("skip Cannot check server version, [%d] %s\n",
+ mysqli_errno($link), mysqli_error($link)));
}
mysqli_free_result($res);
$version = explode('.', $tmp['server_version']);
if (empty($version)) {
- mysqli_close($link);
- die(sprintf("skip Cannot check server version, based on '%s'",
- $tmp['server_version']));
+ mysqli_close($link);
+ die(sprintf("skip Cannot check server version, based on '%s'",
+ $tmp['server_version']));
}
if ($version[0] <= 4 && $version[1] < 1) {
- mysqli_close($link);
- die(sprintf("skip Requires MySQL Server 4.1+\n"));
+ mysqli_close($link);
+ die(sprintf("skip Requires MySQL Server 4.1+\n"));
}
if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STORE_RESULT)) &&
- (mysqli_num_rows($res) == 1)) ||
- (($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin2"', MYSQLI_STORE_RESULT)) &&
- (mysqli_num_rows($res) == 1))
- ) {
- // ok, required latin1 or latin2 are available
- mysqli_close($link);
+ (mysqli_num_rows($res) == 1)) ||
+ (($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin2"', MYSQLI_STORE_RESULT)) &&
+ (mysqli_num_rows($res) == 1))
+ ) {
+ // ok, required latin1 or latin2 are available
+ mysqli_close($link);
} else {
- die(sprintf("skip Requires character set latin1 or latin2\n"));
- mysqli_close($link);
+ die(sprintf("skip Requires character set latin1 or latin2\n"));
+ mysqli_close($link);
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
%s(5) "00000"
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_ssl_set'))
- die("skip function not available");
+ die("skip function not available");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
[009] [%d] (error message varies with the MySQL Server version, check the error code)
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt_attr_get(): Argument #2 ($attr) must be one of MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH, MYSQLI_STMT_ATTR_PREFETCH_ROWS, or STMT_ATTR_CURSOR_TYPE
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
Error: mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
The number of variables must match the number of parameters in the prepared statement
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
Regular, procedural, using variables
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Test 1:
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
plain vanilla...
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_stmt object is not fully initialized
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS type_change"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
mysqli_close($link);
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is already closed
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 40100) {
- die(sprintf('skip Needs MySQL 4.1+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 4.1+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) <= 50000) {
- die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
if (!mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch"))
- printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
+ printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
@mysqli_query($link, 'DROP PROCEDURE IF EXISTS p');
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) < 50503) {
- die(sprintf('skip Needs MySQL 5.5.3+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.5.3+, found version %d.', mysqli_get_server_version($link)));
}
?>
--FILE--
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
+ die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
}
if (mysqli_get_server_version($link) < 50503) {
- die(sprintf('skip Needs MySQL 5.5.3+, found version %d.', mysqli_get_server_version($link)));
+ die(sprintf('skip Needs MySQL 5.5.3+, found version %d.', mysqli_get_server_version($link)));
}
/*
if ($IS_MYSQLND) {
- die(sprintf("skip WHY ?!"));
+ die(sprintf("skip WHY ?!"));
}
*/
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_stmt object is not fully initialized
Fetching BIT column values using the PS API
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
- require_once('connect.inc');
- require_once('table.inc');
- if (mysqli_get_server_version($link) < 50003)
- // b'001' syntax not supported before 5.0.3
- die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
+ require_once('connect.inc');
+ require_once('table.inc');
+ if (mysqli_get_server_version($link) < 50003)
+ // b'001' syntax not supported before 5.0.3
+ die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
OK: 1
mysqli_stmt_fetch - geometry / spatial types
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- if (!defined("MYSQLI_TYPE_GEOMETRY"))
- die("skip MYSQLI_TYPE_GEOMETRY not defined");
+ if (!defined("MYSQLI_TYPE_GEOMETRY"))
+ die("skip MYSQLI_TYPE_GEOMETRY not defined");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_stmt object is not fully initialized
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
array(2) {
Fetching BIT column values using the PS API
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- if (!function_exists('mysqli_stmt_get_result'))
- die("skip mysqli_stmt_get_result() not available");
+ if (!function_exists('mysqli_stmt_get_result'))
+ die("skip mysqli_stmt_get_result() not available");
- require_once('connect.inc');
- require_once('table.inc');
- if (mysqli_get_server_version($link) < 50003)
- // b'001' syntax not supported before 5.0.3
- die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
+ require_once('connect.inc');
+ require_once('table.inc');
+ if (mysqli_get_server_version($link) < 50003)
+ // b'001' syntax not supported before 5.0.3
+ die("skip Syntax used for test not supported with MySQL Server before 5.0.3");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
mysqli_stmt_get_result() - meta data, field_count()
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ if (!function_exists('mysqli_stmt_get_result'))
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
2 2
mysqli_stmt_get_result - geometry / spatial types
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- if (!function_exists('mysqli_stmt_get_result'))
- die("skip mysqli_stmt_get_result() not available");
+ if (!function_exists('mysqli_stmt_get_result'))
+ die("skip mysqli_stmt_get_result() not available");
- if (!defined("MYSQLI_TYPE_GEOMETRY"))
- die("skip MYSQLI_TYPE_GEOMETRY not defined");
+ if (!defined("MYSQLI_TYPE_GEOMETRY"))
+ die("skip MYSQLI_TYPE_GEOMETRY not defined");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
array(2) {
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
object(stdClass)#%d (13) {
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_stmt_get_result'))
- die('skip mysqli_stmt_get_result not available');
+ die('skip mysqli_stmt_get_result not available');
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_result::data_seek(): Argument #1 ($offset) must be greater than or equal to 0
mysqli_stmt_get_result - data types
--SKIPIF--
<?php
- require_once('skipif.inc');
- require_once('skipifconnectfailure.inc');
+ require_once('skipif.inc');
+ require_once('skipifconnectfailure.inc');
- if (!function_exists('mysqli_stmt_get_result'))
- die("skip mysqli_stmt_get_result() not available");
+ if (!function_exists('mysqli_stmt_get_result'))
+ die("skip mysqli_stmt_get_result() not available");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
- die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
- $host, $user, $db, $port, $socket));
+ die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
+ $host, $user, $db, $port, $socket));
}
if (!mysqli_query($link, "DROP TABLE IF EXISTS test") ||
- !mysqli_query($link, "CREATE TABLE test(id SMALLINT)"))
- die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
+ !mysqli_query($link, "CREATE TABLE test(id SMALLINT)"))
+ die(sprintf("skip [%d] %s\n", $link->errno, $link->error));
if (!@mysqli_query($link, "SET sql_mode=''") || !@mysqli_query($link, "INSERT INTO test(id) VALUES (100001)"))
- die("skip Strict sql mode seems to be active. We won't get a warning to check for.");
+ die("skip Strict sql mode seems to be active. We won't get a warning to check for.");
mysqli_query($link, "DROP TABLE IF EXISTS test");
?>
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("connect.inc");
- if (!$link->query('DROP PROCEDURE IF EXISTS p123')) {
- printf("[001] [%d] %s\n", $link->error, $link->errno);
- }
+ require_once("connect.inc");
+ if (!$link->query('DROP PROCEDURE IF EXISTS p123')) {
+ printf("[001] [%d] %s\n", $link->error, $link->errno);
+ }
?>
--EXPECT--
string(4) "pre:"
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
run_tests.php don't fool me with your 'ungreedy' expression '.+?'!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt_send_long_data(): Argument #2 ($param_nr) must be greater than or equal to 0
require_once('skipifconnectfailure.inc');
if (stristr(mysqli_get_client_info(), 'mysqlnd'))
- die("skip: test for libmysql");
+ die("skip: test for libmysql");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
require_once('skipifconnectfailure.inc');
if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
- die("skip: warnings only available in mysqlnd");
+ die("skip: warnings only available in mysqlnd");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
done!
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_stmt object is not fully initialized
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECT--
mysqli object is already closed
require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$TEST_EXPERIMENTAL)
- die("skip - experimental (= unsupported) feature");
+ die("skip - experimental (= unsupported) feature");
?>
--FILE--
<?php
?>
--CLEAN--
<?php
- require_once("clean_table.inc");
+ require_once("clean_table.inc");
?>
--EXPECTF--
Fatal error: Trying to clone an uncloneable object of class mysqli_warning in %s on line %d
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) && $matches[1] >= 10)) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
?>
--FILE--
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) && $matches[1] >= 10)) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
?>
--INI--
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) && $matches[1] >= 10)) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
?>
--FILE--
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) && $matches[1] >= 10)) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
?>
--FILE--
$phpinfo = ob_get_clean();
$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
if ($ov !== 1) {
- die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
+ die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!isset($matches[0]) || !($matches[1] == 10 && $matches[2] == 2)) {
$phpinfo = ob_get_clean();
$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
if ($ov != 1) {
- die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
+ die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
(($matches[1] == 11 && $matches[2] >= 2) ||
($matches[1] >= 12)
))) {
- die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
(($matches[1] == 11 && $matches[2] >= 2) ||
($matches[1] >= 12)
))) {
- die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
&& $matches_sv[3] == $matches[3]
&& $matches_sv[4] == $matches[4])) {
// Avoid diffs due to cross version protocol changes (e.g. like 11.2.0.2-11.2.0.3) and bugs like Oracle bug: 6277160
- die ("skip test only runs when database client libraries and database server are the same version");
+ die ("skip test only runs when database client libraries and database server are the same version");
}
// This test in Oracle 12c needs a non-CDB or the root container
$phpinfo = ob_get_clean();
$ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo);
if ($ov !== 1) {
- die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
+ die ("skip Test only valid when OCI8 is built with an ORACLE_HOME");
}
?>
--ENV--
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) &&
($matches[1] >= 10))) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) &&
($matches[1] >= 10))) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
(($matches[1] == 11 && $matches[2] >= 2) ||
($matches[1] >= 12)
))) {
- die("skip expected output only valid when using Oracle 11gR2 or greater database server");
+ die("skip expected output only valid when using Oracle 11gR2 or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches);
if (!(isset($matches[0]) &&
($matches[1] >= 10))) {
- die("skip expected output only valid when using Oracle 10g or greater database server");
+ die("skip expected output only valid when using Oracle 10g or greater database server");
}
preg_match('/^([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)/', oci_client_version(), $matches);
if (!(isset($matches[0]) &&
--SKIPIF--
<?php include 'skipif.inc'; ?>
<?php
- if ("unixODBC" != ODBC_TYPE) {
- die("skip ODBC_TYPE != unixODBC");
- }
+ if ("unixODBC" != ODBC_TYPE) {
+ die("skip ODBC_TYPE != unixODBC");
+ }
?>
--FILE--
<?php
odbc_data_source(): Basic test
--SKIPIF--
<?php
- include 'skipif.inc';
- if (odbc_data_source($conn, SQL_FETCH_FIRST) === NULL) {
- die("skip no data sources defined on this system");
- }
+ include 'skipif.inc';
+ if (odbc_data_source($conn, SQL_FETCH_FIRST) === NULL) {
+ die("skip no data sources defined on this system");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php include 'skipif.inc'; ?>
<?php
- if ("unixODBC" != ODBC_TYPE) {
- die("skip ODBC_TYPE != unixODBC");
- }
+ if ("unixODBC" != ODBC_TYPE) {
+ die("skip ODBC_TYPE != unixODBC");
+ }
?>
--FILE--
<?php
--CLEAN--
<?php
if (substr(PHP_OS, 0, 3) !== 'WIN') {
- $pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
+ $pattern = __DIR__ . '/*/' . __DIR__ . '/*78185.php.bin';
} else {
- $pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
+ $pattern = __DIR__ . '/*/*/' . str_replace(':', '', __DIR__) . '/*78185.php.bin';
}
foreach (glob($pattern) as $p) {
- unlink($p);
- $p = dirname($p);
- while(strlen($p) > strlen(__DIR__)) {
- rmdir($p);
- $p = dirname($p);
- }
+ unlink($p);
+ $p = dirname($p);
+ while(strlen($p) > strlen(__DIR__)) {
+ rmdir($p);
+ $p = dirname($p);
+ }
}
?>
--EXPECTF--
--SKIPIF--
<?php
if (!extension_loaded("openssl"))
- die("skip");
+ die("skip");
if (!in_array('aes-256-ccm', openssl_get_cipher_methods()))
- die("skip: aes-256-ccm not available");
+ die("skip: aes-256-ccm not available");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded("openssl"))
- die("skip");
+ die("skip");
if (!in_array('aes-128-gcm', openssl_get_cipher_methods()))
- die("skip: aes-128-gcm not available");
+ die("skip: aes-128-gcm not available");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded("openssl"))
- die("skip");
+ die("skip");
if (!in_array('aes-128-gcm', openssl_get_cipher_methods()))
- die("skip: aes-128-gcm not available");
+ die("skip: aes-128-gcm not available");
?>
--FILE--
<?php
<?php
$output_file = __DIR__ . "/openssl_error_string_basic_output.tmp";
if (is_file($output_file)) {
- unlink($output_file);
+ unlink($output_file);
}
?>
--EXPECT--
<?php
$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp";
if (file_exists($pkcsfile)) {
- unlink($pkcsfile);
+ unlink($pkcsfile);
}
?>
--EXPECTF--
<?php
$pkcsfile = __DIR__ . "/openssl_pkcs12_export_to_file__pkcsfile.tmp";
if (file_exists($pkcsfile)) {
- unlink($pkcsfile);
+ unlink($pkcsfile);
}
?>
--EXPECTF--
Test pcntl wait functionality
--SKIPIF--
<?php
- if (!extension_loaded("pcntl")) print "skip";
- elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
+ if (!extension_loaded("pcntl")) print "skip";
+ elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
if (PHP_OS == "Darwin") {
die("skip do not run on darwin");
}
pcntl: pcntl_sigprocmask(), pcntl_sigwaitinfo(), pcntl_sigtimedwait()
--SKIPIF--
<?php
- if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
- elseif (!extension_loaded('posix')) die('skip posix extension not available');
- elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available');
- elseif (!defined('CLD_EXITED')) die('skip CLD_EXITED not defined');
- elseif (getenv('SKIP_ASAN')) die('skip Fails intermittently under asan/msan');
+ if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
+ elseif (!extension_loaded('posix')) die('skip posix extension not available');
+ elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available');
+ elseif (!defined('CLD_EXITED')) die('skip CLD_EXITED not defined');
+ elseif (getenv('SKIP_ASAN')) die('skip Fails intermittently under asan/msan');
?>
--FILE--
<?php
pcntl: SIG_BLOCK, SIG_UNBLOCK, SIG_SETMASK
--SKIPIF--
<?php
- if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
- elseif (!extension_loaded('posix')) die('skip posix extension not available');
- elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available');
+ if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
+ elseif (!extension_loaded('posix')) die('skip posix extension not available');
+ elseif (!function_exists('pcntl_sigwaitinfo') or !function_exists('pcntl_sigtimedwait')) die('skip required functionality is not available');
?>
--FILE--
<?php
Asynchronous signal handling through VM interrupts
--SKIPIF--
<?php
- if (!extension_loaded("pcntl")) print "skip";
- elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
- elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
- elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
+ if (!extension_loaded("pcntl")) print "skip";
+ elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
+ elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
+ elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
?>
--FILE--
<?php
Bug #73783: (SIG_IGN needs to be set to prevent syscals from returning early)
--SKIPIF--
<?php
- if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
- elseif (!extension_loaded('posix')) die('skip posix extension not available');
+ if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
+ elseif (!extension_loaded('posix')) die('skip posix extension not available');
?>
--FILE--
<?php
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
- elseif (!extension_loaded('posix')) die('skip posix extension not available');
+ if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
+ elseif (!extension_loaded('posix')) die('skip posix extension not available');
?>
--FILE--
<?php
#PHPTestFest Cesena Italia on 2009-06-20
--SKIPIF--
<?php
- if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
- elseif (!extension_loaded('posix')) die('skip posix extension not available');
+ if (!extension_loaded('pcntl')) die('skip pcntl extension not available');
+ elseif (!extension_loaded('posix')) die('skip posix extension not available');
?>
--FILE--
<?php
Test pcntl_get_last_error()
--SKIPIF--
<?php
- if (!extension_loaded("pcntl")) print "skip";
+ if (!extension_loaded("pcntl")) print "skip";
?>
--FILE--
<?php
pcnt_signal_dispatch()
--SKIPIF--
<?php
- if (!extension_loaded("pcntl")) print "skip";
- elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
- elseif (!function_exists("pcntl_signal_dispatch")) print "skip pcntl_signal_dispatch() not available";
- elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
- elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
+ if (!extension_loaded("pcntl")) print "skip";
+ elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
+ elseif (!function_exists("pcntl_signal_dispatch")) print "skip pcntl_signal_dispatch() not available";
+ elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
+ elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
?>
--FILE--
<?php
Closures as a signal handler
--SKIPIF--
<?php
- if (!extension_loaded("pcntl")) print "skip";
- elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
- elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
- elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
+ if (!extension_loaded("pcntl")) print "skip";
+ elseif (!function_exists("pcntl_signal")) print "skip pcntl_signal() not available";
+ elseif (!function_exists("posix_kill")) print "skip posix_kill() not available";
+ elseif (!function_exists("posix_getpid")) print "skip posix_getpid() not available";
?>
--FILE--
<?php
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
+ die('skip no utf8 support in PCRE library');
}
?>
--FILE--
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
+ die("skip no support for \p support PCRE library");
}
?>
--INI--
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
+ die('skip no utf8 support in PCRE library');
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == "WIN") {
- die('skip not for windows');
+ die('skip not for windows');
}
?>
--INI--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != "WIN") {
- die('skip windows only');
+ die('skip windows only');
}
?>
--INI--
Bug #76850 Exit code mangled by set locale/preg_match
--SKIPIF--
<?php
- $l = setlocale(LC_CTYPE, 0);
- if ("C" == $l) {
- die("skip need the current locale to be other than C");
- }
+ $l = setlocale(LC_CTYPE, 0);
+ if ("C" == $l) {
+ die("skip need the current locale to be other than C");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if(!ini_get("pcre.jit")) {
- echo "skip JIT is disabled";
+ echo "skip JIT is disabled";
}
?>
--FILE--
Bug #77193 Infinite loop in preg_replace_callback
--SKIPIF--
<?php
- if (!extension_loaded("filter")) {
- die("skip need filter extension");
- }
+ if (!extension_loaded("filter")) {
+ die("skip need filter extension");
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (ini_get("pcre.jit") === FALSE) {
- die("skip no jit built");
+ die("skip no jit built");
}
--FILE--
<?php
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
+ die("skip no support for \p support PCRE library");
}
?>
--INI--
--SKIPIF--
<?php
if (ini_get('pcre.jit') === false) {
- die("skip no jit built");
+ die("skip no jit built");
}
?>
--INI--
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
+ die('skip no utf8 support in PCRE library');
}
?>
--FILE--
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
+ die('skip no utf8 support in PCRE library');
}
?>
--FILE--
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
+ die("skip no support for \p support PCRE library");
}
?>
--FILE--
--SKIPIF--
<?php
if (ini_get("pcre.jit") === FALSE) {
- die("skip no jit built");
+ die("skip no jit built");
}
?>
--INI--
--SKIPIF--
<?php
if (@preg_match('/./u', '') === false) {
- die('skip no utf8 support in PCRE library');
+ die('skip no utf8 support in PCRE library');
}
?>
--FILE--
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
- die("skip no support for \p support PCRE library");
+ die("skip no support for \p support PCRE library");
}
?>
--INI--
<?php
if (!extension_loaded('pdo')) die('skip PDO not available');
try {
- $pdo = new PDO("sqlite:".__DIR__."/foo.db");
+ $pdo = new PDO("sqlite:".__DIR__."/foo.db");
} catch (Exception $e) {
- die("skip PDP_SQLITE not available");
+ die("skip PDP_SQLITE not available");
}
?>
--FILE--
$allowed = array('oci', 'pgsql');
$ok = false;
foreach ($allowed as $driver) {
- if (!strncasecmp(getenv('PDOTEST_DSN'), $driver, strlen($driver))) {
- $ok = true;
- }
+ if (!strncasecmp(getenv('PDOTEST_DSN'), $driver, strlen($driver))) {
+ $ok = true;
+ }
}
if (!$ok) {
- die("skip Scrollable cursors not supported");
+ die("skip Scrollable cursors not supported");
}
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
--SKIPIF--
<?php
if (!extension_loaded("pdo_sqlite"))
- die("skip: PDO_SQLite not available");
+ die("skip: PDO_SQLite not available");
?>
--FILE--
<?php
}
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
- require_once(__DIR__ . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc');
- if (false === MySQLPDOTest::detect_transactional_mysql_engine($db)) {
- die('skip your mysql configuration does not support working transactions');
- }
+ require_once(__DIR__ . DIRECTORY_SEPARATOR . '../../pdo_mysql/tests/mysql_pdo_test.inc');
+ if (false === MySQLPDOTest::detect_transactional_mysql_engine($db)) {
+ die('skip your mysql configuration does not support working transactions');
+ }
}
?>
--FILE--
$driver = substr(getenv('PDOTEST_DSN'), 0, strpos(getenv('PDOTEST_DSN'), ':'));
if (!in_array($driver, array('mssql','sybase','dblib','firebird','mysql','oci')))
- die('skip not supported');
+ die('skip not supported');
require_once $dir . 'pdo_test.inc';
PDOTest::skip();
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--XFAIL--
nextRowset() problem with stored proc & emulation mode & mysqlnd
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
die("skip $version");
if ($version < 40100)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 41000)
- die(sprintf("skip Need MySQL Server 4.1.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 4.1.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 41000)
- die(sprintf("skip Will work different with MySQL Server < 4.1.0, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Will work different with MySQL Server < 4.1.0, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 40106)
- die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
MySQLPDOTest::skip();
/* TODO - fix this limitation */
if (getenv('PDO_MYSQL_TEST_DSN') !== "mysql:dbname=phptest;unix_socket=/tmp/mysql.sock")
- die("skip Fix test to run in other environments as well!");
+ die("skip Fix test to run in other environments as well!");
?>
--INI--
pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock"
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
if (MySQLPDOTest::isPDOMySQLnd())
- die("skip libmysql only options")
+ die("skip libmysql only options")
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
if (MySQLPDOTest::isPDOMySQLnd())
- die("skip PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported with mysqlnd");
+ die("skip PDO::MYSQL_ATTR_MAX_BUFFER_SIZE not supported with mysqlnd");
?>
--FILE--
<?php
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
- die("skip Transactional engine not found");
+ die("skip Transactional engine not found");
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
if (MySQLPDOTest::isPDOMySQLnd())
- die("skip Known bug - mysqlnd handles BIT incorrectly!");
+ die("skip Known bug - mysqlnd handles BIT incorrectly!");
?>
--FILE--
<?php
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc');
if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) {
- /* Need connection to detect library version */
- require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
- MySQLPDOTest::skip();
+ /* Need connection to detect library version */
+ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
+ MySQLPDOTest::skip();
}
?>
--FILE--
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
- die("skip Transactional engine not found");
+ die("skip Transactional engine not found");
?>
--FILE--
<?php
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$tmp = explode('@', $row['_user']);
if (count($tmp) < 2)
- die("skip Cannot detect if test is run against local or remote database server");
+ die("skip Cannot detect if test is run against local or remote database server");
if (($tmp[1] !== 'localhost') && ($tmp[1] !== '127.0.0.1'))
- die("skip Test cannot be run against remote database server");
+ die("skip Test cannot be run against remote database server");
$stmt = $db->query("SHOW VARIABLES LIKE 'secure_file_priv'");
if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) {
- if (!is_writable($row['value']))
- die("skip secure_file_priv directory not writable: {$row['value']}");
+ if (!is_writable($row['value']))
+ die("skip secure_file_priv directory not writable: {$row['value']}");
- $filename = $row['value'] . DIRECTORY_SEPARATOR . "pdo_mysql_exec_load_data.csv";
+ $filename = $row['value'] . DIRECTORY_SEPARATOR . "pdo_mysql_exec_load_data.csv";
- if (file_exists($filename) && !is_writable($filename))
- die("skip {$filename} not writable");
+ if (file_exists($filename) && !is_writable($filename))
+ die("skip {$filename} not writable");
}
?>
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
- die("skip Transactional engine not found");
+ die("skip Transactional engine not found");
?>
--FILE--
<?php
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
- die("skip Transactional engine not found");
+ die("skip Transactional engine not found");
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
if (!MYSQLPDOTest::isPDOMySQLnd())
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
if (!MYSQLPDOTest::isPDOMySQLnd())
- die("skip mysqlnd only test");
+ die("skip mysqlnd only test");
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
if (!MySQLPDOTest::isPDOMySQLnd())
- die("skip This will not work with libmysql");
+ die("skip This will not work with libmysql");
?>
--FILE--
<?php
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$tmp = explode('@', $row['_user']);
if (count($tmp) < 2)
- die("skip Cannot detect if test is run against local or remote database server");
+ die("skip Cannot detect if test is run against local or remote database server");
if (($tmp[1] !== 'localhost') && ($tmp[1] !== '127.0.0.1'))
- die("skip Test cannot be run against remote database server");
+ die("skip Test cannot be run against remote database server");
$stmt = $db->query("SHOW VARIABLES LIKE 'secure_file_priv'");
if (($row = $stmt->fetch(PDO::FETCH_ASSOC)) && ($row['value'] != '')) {
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (false == MySQLPDOTest::detect_transactional_mysql_engine($db))
- die("skip Transactional engine not found");
+ die("skip Transactional engine not found");
?>
--FILE--
<?php
$tmp = MySQLPDOTest::getTempDir();
if (!$tmp)
- die("skip Can't create temporary file");
+ die("skip Can't create temporary file");
$file = $tmp . DIRECTORY_SEPARATOR . 'pdoblob.tst';
$fp = fopen($file, 'w');
if (!$fp)
- die("skip Can't create temporary file");
+ die("skip Can't create temporary file");
if (4 != fwrite($fp, 'test')) {
- die("skip Can't create temporary file");
+ die("skip Can't create temporary file");
}
fclose($fp);
clearstatcache();
if (!file_exists($file))
- die("skip Can't create temporary file");
+ die("skip Can't create temporary file");
unlink($file);
?>
$db = MySQLPDOTest::factory();
try {
- $query = "SELECT '', NULL, \"\" FROM DUAL";
- $stmt = $db->prepare($query);
- $ok = @$stmt->execute();
+ $query = "SELECT '', NULL, \"\" FROM DUAL";
+ $stmt = $db->prepare($query);
+ $ok = @$stmt->execute();
} catch (PDOException $e) {
- die("skip: Test cannot be run with SQL mode ANSI");
+ die("skip: Test cannot be run with SQL mode ANSI");
}
if (!$ok)
- die("skip: Test cannot be run with SQL mode ANSI");
+ die("skip: Test cannot be run with SQL mode ANSI");
?>
--FILE--
<?php
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$version = ((int)substr($row['_version'], 0, 1) * 10) + (int)substr($row['_version'], 2, 1);
if ($version < 51)
- die("skip Test needs MySQL 5.1+");
+ die("skip Test needs MySQL 5.1+");
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
if (!MySQLPDOTest::isPDOMySQLnd())
- die("skip This will not work with libmysql");
+ die("skip This will not work with libmysql");
?>
--FILE--
<?php
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
if (MYSQLPDOTest::isPDOMySQLnd())
- die("skip libmysql only test");
+ die("skip libmysql only test");
?>
--FILE--
<?php
$row = $db->query('SELECT VERSION() as _version')->fetch(PDO::FETCH_ASSOC);
$matches = array();
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
- die(sprintf("skip Cannot determine MySQL Server version\n"));
+ die(sprintf("skip Cannot determine MySQL Server version\n"));
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
if ($version < 50000)
- die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
- $matches[1], $matches[2], $matches[3], $version));
+ die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
+ $matches[1], $matches[2], $matches[3], $version));
?>
--FILE--
<?php
<?php
if (!extension_loaded('pdo_odbc')) print 'skip';
if (substr(PHP_OS, 0, 3) == 'WIN' &&
- false === getenv('PDOTEST_DSN') &&
- false === getenv('PDO_ODBC_TEST_DSN') &&
- !extension_loaded('com_dotnet')) {
- die('skip - either PDOTEST_DSN or com_dotnet extension is needed to setup the connection');
+ false === getenv('PDOTEST_DSN') &&
+ false === getenv('PDO_ODBC_TEST_DSN') &&
+ !extension_loaded('com_dotnet')) {
+ die('skip - either PDOTEST_DSN or com_dotnet extension is needed to setup the connection');
}
--REDIRECTTEST--
# magic auto-configuration
// Assume that if we can't create or drop a user, this test needs to be skipped
try {
- $db->exec("DROP USER IF EXISTS $user");
- $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
+ $db->exec("DROP USER IF EXISTS $user");
+ $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
} catch (PDOException $e) {
- die("skip You need CREATEUSER permissions to run the test");
+ die("skip You need CREATEUSER permissions to run the test");
}
// Peer authentication might prevent the test from properly running
try {
- $testConn = new PDO($dsn, $user, $pass);
+ $testConn = new PDO($dsn, $user, $pass);
} catch (PDOException $e) {
- echo "skip ".$e->getMessage();
+ echo "skip ".$e->getMessage();
}
$db->exec("DROP USER $user");
$db = PDOTest::factory();
if (version_compare($db->getAttribute(PDO::ATTR_SERVER_VERSION), '9.0.0') < 0) {
- die("skip Requires 9.0+");
+ die("skip Requires 9.0+");
}
?>
// Assume that if we can't create or drop a user, this test needs to be skipped
try {
- $db->exec("DROP USER IF EXISTS $user");
- $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
+ $db->exec("DROP USER IF EXISTS $user");
+ $db->exec("CREATE USER $user WITH PASSWORD '$pass'");
} catch (PDOException $e) {
- die("skip You need CREATEUSER permissions to run the test");
+ die("skip You need CREATEUSER permissions to run the test");
}
// Peer authentication might prevent the test from properly running
try {
- $testConn = new PDO($dsn, $user, $pass);
+ $testConn = new PDO($dsn, $user, $pass);
} catch (PDOException $e) {
- echo "skip ".$e->getMessage();
+ echo "skip ".$e->getMessage();
}
$db->exec("DROP USER $user");
<?php
$filename = __DIR__ . DIRECTORY_SEPARATOR . "pdo_sqlite_open_flags.db";
if (file_exists($filename)) {
- unlink($filename);
+ unlink($filename);
}
?>
--EXPECTF--
<?php if (!extension_loaded("phar")) die("skip"); ?>
<?php if (!extension_loaded('Zend OPcache')) die('skip Zend OPcache extension not available'); ?>
<?php
- $cache_dir = dirname(__FILE__) . "/024-file_cache";
- if (!is_dir($cache_dir) && !mkdir($cache_dir)) die("skip unable to create file_cache dir");
+ $cache_dir = dirname(__FILE__) . "/024-file_cache";
+ if (!is_dir($cache_dir) && !mkdir($cache_dir)) die("skip unable to create file_cache dir");
?>
--INI--
phar.require_hash=0
--TEST--
Phar: Bug #77022: PharData always creates new files with mode 0666
--SKIPIF--
-<?php
-if (!extension_loaded("phar")) die("skip");
+<?php
+if (!extension_loaded("phar")) die("skip");
if (defined("PHP_WINDOWS_VERSION_MAJOR")) die("skip not for Windows")
?>
--FILE--
--TEST--
Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions
--SKIPIF--
-<?php
-if (!extension_loaded("phar")) die("skip");
+<?php
+if (!extension_loaded("phar")) die("skip");
if (defined("PHP_WINDOWS_VERSION_MAJOR")) die("skip not for Windows")
?>
--FILE--
Phar::buildFromDirectory() - non-directory passed as first parameter
--SKIPIF--
<?php
- if (!extension_loaded("phar")) die("skip");
- if (substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only test");
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only test");
?>
--INI--
phar.require_hash=0
Phar::buildFromDirectory() - non-directory passed as first parameter
--SKIPIF--
<?php
- if (!extension_loaded("phar")) die("skip");
- if (substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
+ if (!extension_loaded("phar")) die("skip");
+ if (substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
?>
--INI--
phar.require_hash=0
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if (!extension_loaded('posix')) {
+ if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
// needed because of #ifdef HAVE_CTERMID in posix.c
Test posix_getgrgid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getgrgid() function : error conditions
--SKIPIF--
<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
?>
--FILE--
<?php
Test posix_getgrnam() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
- if (!posix_getgroups()) die('skip - groups unavailable (ci)');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!posix_getgroups()) die('skip - groups unavailable (ci)');
?>
--FILE--
<?php
Test posix_getgroups() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getpgid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
--SKIPIF--
<?php
if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
- print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
+ print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
}
?>
--FILE--
Test posix_getpgrp() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getpid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getppid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
User Group: PHPSP #phptestfestbrasil
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getpwuid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
Test posix_getpwuid() function : error conditions
--SKIPIF--
<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
?>
--FILE--
<?php
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if(!extension_loaded("posix")) print "SKIP - POSIX extension not loaded";
+ if(!extension_loaded("posix")) print "SKIP - POSIX extension not loaded";
?>
--FILE--
<?php
Test posix_getsid() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if(!extension_loaded("posix")) {
+ if(!extension_loaded("posix")) {
die("SKIP - POSIX extension not loaded");
}
?>
Test posix_kill() function : error conditions
--SKIPIF--
<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
?>
--FILE--
<?php
Test posix_strerror() function : error conditions
--SKIPIF--
<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
+ if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
?>
--FILE--
<?php
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if (!extension_loaded('posix')) {
+ if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
?>
Test posix_times() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if (!extension_loaded('posix')) {
+ if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
?>
PHP Testfest Berlin 2009-05-10
--SKIPIF--
<?php
- if (!extension_loaded('posix')) {
+ if (!extension_loaded('posix')) {
die('SKIP - POSIX extension not available');
}
- if (!extension_loaded('standard')) {
+ if (!extension_loaded('standard')) {
die('SKIP - Standard extension not available');
}
?>
Test posix_uname() function : basic functionality
--SKIPIF--
<?php
- if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
?>
--FILE--
<?php
<?php
if (!extension_loaded("pspell")) die("skip");
if (!@pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER))) {
- die("skip English dictionary is not available");
+ die("skip English dictionary is not available");
}
?>
--FILE--
<?php if (!extension_loaded("readline")) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
<?php if (!extension_loaded("readline")) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip not for windows');
+ die('skip not for windows');
}
?>
--FILE--
<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
<?php if (!extension_loaded("readline") || !function_exists('readline_add_history')) die("skip");
if (READLINE_LIB != "libedit") die("skip libedit only");
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip not for windows');
+ die('skip not for windows');
}
?>
--FILE--
echo "\nRetrieving non-existent values from A with no default value:\n";
try {
- var_dump($rcA->getStaticPropertyValue("protectedDoesNotExist"));
+ var_dump($rcA->getStaticPropertyValue("protectedDoesNotExist"));
echo "you should not see this";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
try {
- var_dump($rcA->getStaticPropertyValue("privateDoesNotExist"));
+ var_dump($rcA->getStaticPropertyValue("privateDoesNotExist"));
echo "you should not see this";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
echo "\nSet non-existent values from A with no default value:\n";
try {
- var_dump($rcA->setStaticPropertyValue("protectedDoesNotExist", "new value 8"));
+ var_dump($rcA->setStaticPropertyValue("protectedDoesNotExist", "new value 8"));
echo "you should not see this";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
try {
- var_dump($rcA->setStaticPropertyValue("privateDoesNotExist", "new value 9"));
+ var_dump($rcA->setStaticPropertyValue("privateDoesNotExist", "new value 9"));
echo "you should not see this";
} catch (Exception $e) {
echo $e->getMessage() . "\n";
Bug #42596 (session.save_path MODE option will not set "write" bit for group or world)
--SKIPIF--
<?php
- if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
- include('skipif.inc');
+ if(substr(PHP_OS, 0, 3) == "WIN") die("skip not for Windows");
+ include('skipif.inc');
?>
--INI--
session.use_cookies=0
--SKIPIF--
<?php include('skipif.inc');
if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip Not for Windows");
+ die("skip Not for Windows");
?>
--INI--
session.save_handler=files
shmop extension test
--SKIPIF--
<?php
- if (!extension_loaded("shmop")) {
- die("skip shmop() extension not available");
- }
+ if (!extension_loaded("shmop")) {
+ die("skip shmop() extension not available");
+ }
?>
--FILE--
<?php
edgarsandi - <edgar.r.sandi@gmail.com>
--SKIPIF--
<?php
- if (!extension_loaded("shmop")) {
- die("skip shmop() extension not available");
- }
+ if (!extension_loaded("shmop")) {
+ die("skip shmop() extension not available");
+ }
?>
--FILE--
<?php
SimpleXML: echo/print
--SKIPIF--
<?php
- if (!extension_loaded('simplexml')) print 'skip';
+ if (!extension_loaded('simplexml')) print 'skip';
?>
--FILE--
<?php
SimpleXML: Attribute creation
--SKIPIF--
<?php
- if (!extension_loaded('simplexml')) print 'skip';
+ if (!extension_loaded('simplexml')) print 'skip';
?>
--FILE--
<?php
SimpleXML: Split text content
--SKIPIF--
<?php
- if (!extension_loaded('simplexml')) print 'skip';
+ if (!extension_loaded('simplexml')) print 'skip';
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('%EXTNAME%')) {
- echo 'skip';
+ echo 'skip';
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('%EXTNAME%')) {
- echo 'skip';
+ echo 'skip';
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('%EXTNAME%')) {
- echo 'skip';
+ echo 'skip';
}
?>
--FILE--
$packed = str_repeat(chr(0), 15) . chr(1);
if (@inet_ntop($packed) === false) {
- die("skip no IPv6 support");
+ die("skip no IPv6 support");
}
?>
--FILE--
$packed = str_repeat(chr(0), 15) . chr(1);
if (@inet_ntop($packed) === false) {
- die("skip no IPv6 support");
+ die("skip no IPv6 support");
}
?>
--FILE--
server
--SKIPIF--
<?php
- require_once('skipif.inc');
- if (!extension_loaded("zlib")) {
- echo "skip zlib is required for this test";
- }
-
- if (!file_exists(__DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc")) {
- echo "skip sapi/cli/tests/php_cli_server.inc required but not found";
- }
+ require_once('skipif.inc');
+ if (!extension_loaded("zlib")) {
+ echo "skip zlib is required for this test";
+ }
+
+ if (!file_exists(__DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc")) {
+ echo "skip sapi/cli/tests/php_cli_server.inc required but not found";
+ }
?>
--FILE--
<?php
Bug #77088 (Segfault when using SoapClient with null options)
--SKIPIF--
<?php
- require_once('skipif.inc');
+ require_once('skipif.inc');
?>
--FILE--
<?php
SOAP customized Content-Type, eg. SwA use case
--SKIPIF--
<?php
- require_once('skipif.inc');
+ require_once('skipif.inc');
- if (!file_exists(__DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc")) {
- echo "skip sapi/cli/tests/php_cli_server.inc required but not found";
- }
+ if (!file_exists(__DIR__ . "/../../../sapi/cli/tests/php_cli_server.inc")) {
+ echo "skip sapi/cli/tests/php_cli_server.inc required but not found";
+ }
?>
--CONFLICTS--
server
--SKIPIF--
<?php
if (defined('PHP_WINDOWS_VERSION_MAJOR')) {
- die('skip, windows has different TZ format');
+ die('skip, windows has different TZ format');
}
require_once('skipif.inc'); ?>
--FILE--
SOAP Server 9: setclass and setpersistence(SOAP_PERSISTENCE_SESSION)
--SKIPIF--
<?php
- require_once('skipif.inc');
- if (!extension_loaded('session')) {
- die('skip this test needs session extension');
- }
+ require_once('skipif.inc');
+ if (!extension_loaded('session')) {
+ die('skip this test needs session extension');
+ }
?>
--INI--
session.auto_start=1
SOAP Server 19: compressed request (gzip)
--SKIPIF--
<?php
- if (php_sapi_name()=='cli') echo 'skip';
- require_once('skipif.inc');
- if (!extension_loaded('zlib')) die('skip zlib extension not available');
+ if (php_sapi_name()=='cli') echo 'skip';
+ require_once('skipif.inc');
+ if (!extension_loaded('zlib')) die('skip zlib extension not available');
?>
--INI--
precision=14
SOAP Server 20: compressed request (deflate)
--SKIPIF--
<?php
- if (php_sapi_name()=='cli') echo 'skip';
- require_once('skipif.inc');
- if (!extension_loaded('zlib')) die('skip zlib extension not available');
+ if (php_sapi_name()=='cli') echo 'skip';
+ require_once('skipif.inc');
+ if (!extension_loaded('zlib')) die('skip zlib extension not available');
?>
--INI--
precision=14
</SOAP-ENV:Envelope>
--SKIPIF--
<?php
- if (php_sapi_name()=='cli') echo 'skip';
- require_once('skipif.inc');
+ if (php_sapi_name()=='cli') echo 'skip';
+ require_once('skipif.inc');
?>
--FILE--
<?php
die('skip sockets extension not available.');
}
if (!defined('IPPROTO_IPV6')) {
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
}
if (PHP_OS != "WINNT")
- die('skip test relies Winsock\'s error code for WSAEWOULDBLOCK/EAGAIN');
+ die('skip test relies Winsock\'s error code for WSAEWOULDBLOCK/EAGAIN');
--FILE--
<?php
$listenfd = socket_create(AF_INET6, SOCK_STREAM, SOL_TCP);
IPv4 Loopback test
--SKIPIF--
<?php
- if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
- }
+ if (!extension_loaded('sockets')) {
+ die('skip sockets extension not available.');
+ }
?>
--FILE--
<?php
IPv6 Loopback test
--SKIPIF--
<?php
- if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
- }
- require 'ipv6_skipif.inc';
+ if (!extension_loaded('sockets')) {
+ die('skip sockets extension not available.');
+ }
+ require 'ipv6_skipif.inc';
?>
--FILE--
<?php
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '0.0.0.0', 3000);
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
- "group" => '224.0.0.23',
- "interface" => 'lo',
+ "group" => '224.0.0.23',
+ "interface" => 'lo',
));
if ($so === false) {
die('skip interface \'lo\' is unavailable.');
}
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die("err");
if (socket_set_option($s, IPPROTO_IP, IP_MULTICAST_IF, 1) === false) {
- die("skip interface 1 either doesn't exist or has no ipv4 address");
+ die("skip interface 1 either doesn't exist or has no ipv4 address");
}
--FILE--
<?php
$level = IPPROTO_IP;
$s = socket_create($domain, SOCK_DGRAM, SOL_UDP);
if ($s === false) {
- die("skip unable to create socket");
+ die("skip unable to create socket");
}
if (socket_set_option($s, $level, IP_MULTICAST_IF, 1) === false) {
- die("skip interface 1 either doesn't exist or has no ipv4 address");
+ die("skip interface 1 either doesn't exist or has no ipv4 address");
}
--FILE--
<?php
die('skip sockets extension not available.');
}
if (!defined('IPPROTO_IPV6')) {
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
}
$s = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
if ($s === false) {
* troublesome to send multicast traffic from lo, which we must since
* we're dealing with interface-local traffic... */
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
+ "group" => 'ff01::114',
+ "interface" => 0,
));
if ($so === false) {
die('skip unable to join multicast group on any interface.');
}
$r = socket_sendto($s, $m = "testing packet", strlen($m), 0, 'ff01::114', 3000);
if ($r === false) {
- die('skip unable to send multicast packet.');
+ die('skip unable to send multicast packet.');
}
if (!defined("MCAST_JOIN_SOURCE_GROUP"))
die('skip source operations are unavailable');
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
+ "group" => 'ff01::114',
+ "interface" => 0,
));
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
- "source" => '2001::dead:beef',
+ "group" => 'ff01::114',
+ "interface" => 0,
+ "source" => '2001::dead:beef',
));
if ($so === false) {
die('skip protocol independent multicast API is unavailable.');
die('skip sockets extension not available.');
}
if (!defined('IPPROTO_IPV6')) {
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
}
$s = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP);
$br = socket_bind($s, '::', 3000);
* troublesome to send multicast traffic from lo, which we must since
* we're dealing with interface-local traffic... */
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
+ "group" => 'ff01::114',
+ "interface" => 0,
));
if ($so === false) {
die('skip unable to join multicast group on any interface.');
}
$r = socket_sendto($s, $m = "testing packet", strlen($m), 0, 'ff01::114', 3000);
if ($r === false) {
- die('skip unable to send multicast packet.');
+ die('skip unable to send multicast packet.');
}
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
+ "group" => 'ff01::114',
+ "interface" => 0,
));
if (defined("MCAST_JOIN_SOURCE_GROUP")) {
- $so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
- "group" => 'ff01::114',
- "interface" => 0,
- "source" => '2001::dead:beef',
- ));
- if ($so !== false) {
- die('skip protocol independent multicast API is available.');
- }
+ $so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
+ "group" => 'ff01::114',
+ "interface" => 0,
+ "source" => '2001::dead:beef',
+ ));
+ if ($so !== false) {
+ die('skip protocol independent multicast API is available.');
+ }
}
--FILE--
<?php
die('skip sockets extension not available.');
}
if (getenv('CI_NO_IPV6') || !defined('IPPROTO_IPV6')) {
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
}
$level = IPPROTO_IPV6;
$s = socket_create(AF_INET6, SOCK_DGRAM, SOL_UDP) or die("skip Can not create socket");
if (socket_set_option($s, $level, IPV6_MULTICAST_IF, 1) === false) {
- die("skip interface 1 either doesn't exist or has no ipv6 address");
+ die("skip interface 1 either doesn't exist or has no ipv6 address");
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
if (PHP_OS != 'Linux') {
- die('skip For Linux only');
+ die('skip For Linux only');
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
if (PHP_OS != 'Linux') {
- die('skip For Linux only');
+ die('skip For Linux only');
}
?>
--FILE--
die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. Not valid for non Windows');
+ die('skip.. Not valid for non Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. Not valid for non Windows');
+ die('skip.. Not valid for non Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = @socket_bind($s, '0.0.0.0', 58393);
if ($br === false)
- die("SKIP IPv4/port 58393 not available");
+ die("SKIP IPv4/port 58393 not available");
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
- "group" => '224.0.0.23',
- "interface" => "lo",
+ "group" => '224.0.0.23',
+ "interface" => "lo",
));
if ($so === false)
- die("SKIP joining group 224.0.0.23 on interface lo failed");
+ die("SKIP joining group 224.0.0.23 on interface lo failed");
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die("skip Not Valid for Linux");
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
die("skip Not Valid for Windows");
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if (!function_exists('zend_leak_variable'))
- die('SKIP only for debug builds');
+ die('SKIP only for debug builds');
?>
--INI--
report_memleaks=0
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
}
require 'ipv6_skipif.inc';
?>
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
$s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
$br = @socket_bind($s, '0.0.0.0', 58379);
if ($br === false)
- die("SKIP IPv4/port 58379 not available");
+ die("SKIP IPv4/port 58379 not available");
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
- "group" => '224.0.0.23',
- "interface" => "lo",
+ "group" => '224.0.0.23',
+ "interface" => "lo",
));
if ($so === false)
- die("SKIP joining group 224.0.0.23 on interface lo failed");
+ die("SKIP joining group 224.0.0.23 on interface lo failed");
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
die("skip Not Valid for Linux");
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
die("skip Not Valid for Windows");
--SKIPIF--
<?php
if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
+ die('SKIP sockets extension not available.');
}
if (!function_exists('zend_leak_variable'))
- die('SKIP only for debug builds');
+ die('SKIP only for debug builds');
?>
--INI--
report_memleaks=0
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. Not valid for non Windows');
+ die('skip.. Not valid for non Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
require 'ipv6_skipif.inc';
if (!defined('IPPROTO_IPV6'))
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
if (substr(PHP_OS, 0, 3) == 'WIN')
- die('skip Not for the Windows!');
+ die('skip Not for the Windows!');
/* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via
* WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg
* does not accept IPV6_TCLASS messages */
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
require 'ipv6_skipif.inc';
if (!defined('IPPROTO_IPV6'))
- die('skip IPv6 not available.');
+ die('skip IPv6 not available.');
/* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via
* WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg
* does not accept IPV6_TCLASS messages. We still test that sendmsg() works
die('SKIP The sockets extension is not loaded.');
}
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip only for Windows');
+ die('skip only for Windows');
}
require 'ipv6_skipif.inc';
--FILE--
die('SKIP The sockets extension is not loaded.');
}
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip Not valid for Windows');
+ die('skip Not valid for Windows');
}
require 'ipv6_skipif.inc';
?>
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
if (!extension_loaded('sockets')) {
die('SKIP The sockets extension is not loaded.');
die('SKIP sockets extension not available.');
}
if (!defined("SO_BINDTODEVICE")) {
- die('SKIP SO_BINDTODEVICE not supported on this platform.');
+ die('SKIP SO_BINDTODEVICE not supported on this platform.');
}
if (!function_exists("posix_getuid") || posix_getuid() != 0) {
- die('SKIP SO_BINDTODEVICE requires root permissions.');
+ die('SKIP SO_BINDTODEVICE requires root permissions.');
}
?>
--FILE--
die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
die('SKIP sockets extension not available.');
}
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip not for windows');
+ die('skip not for windows');
}
?>
--FILE--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip.. Not valid for Windows');
+ die('skip.. Not valid for Windows');
}
- if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
- }
+ if (!extension_loaded('sockets')) {
+ die('skip sockets extension not available.');
+ }
?>
--FILE--
<?php
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. Windows only test');
+ die('skip.. Windows only test');
}
if (!extension_loaded('sockets')) {
- die('skip sockets extension not available.');
+ die('skip sockets extension not available.');
}
?>
--FILE--
<?php
class first {
- public static function init() {
- spl_autoload_register(array('self','load'));
- }
- public static function load($class) {}
+ public static function init() {
+ spl_autoload_register(array('self','load'));
+ }
+ public static function load($class) {}
}
class second {
- public static function init() {
- spl_autoload_register(array('self','load'));
- }
- public static function load($class){}
+ public static function init() {
+ spl_autoload_register(array('self','load'));
+ }
+ public static function load($class){}
}
first::init();
<?php require_once(__DIR__ . '/skipif.inc');
// Create an instance of the ReflectionMethod class
try {
- $method = new ReflectionMethod('sqlite3result', 'numRows');
+ $method = new ReflectionMethod('sqlite3result', 'numRows');
} catch (ReflectionException $e) {
- die("skip SQLite3Result::numRows method does not exist");
+ die("skip SQLite3Result::numRows method does not exist");
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
require_once(__DIR__ . '/skipif.inc');
?>
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip non windows test');
+ die('skip non windows test');
}
require_once(__DIR__ . '/skipif.inc');
if (!function_exists('posix_geteui')) {
require_once(__DIR__ . '/skipif.inc');
$r = new ReflectionClass("sqlite3");
if (!$r->hasMethod("loadExtension")) {
- die("skip - sqlite3 doesn't have loadExtension enabled");
+ die("skip - sqlite3 doesn't have loadExtension enabled");
}
?>
--INI--
require_once(__DIR__ . '/skipif.inc');
if (!method_exists('SQLite3', 'loadExtension')) {
- die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
+ die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
}
?>
--FILE--
require_once(__DIR__ . '/skipif.inc');
if (!method_exists('SQLite3', 'loadExtension')) {
- die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
+ die("skip if SQLITE_OMIT_LOAD_EXTENSION defined");
}
?>
--FILE--
<?php require_once(__DIR__ . '/skipif.inc');
if (SQLite3::version()['versionNumber'] < 3026000) {
- die("skip: sqlite3 library version < 3.26: no support for defensive mode");
+ die("skip: sqlite3 library version < 3.26: no support for defensive mode");
}
?>
<?php require_once(__DIR__ . '/skipif.inc');
if (SQLite3::version()['versionNumber'] < 3014000) {
- die('skip SQLite < 3.14 installed, requires SQLite >= 3.14');
+ die('skip SQLite < 3.14 installed, requires SQLite >= 3.14');
}
?>
--FILE--
--SKIPIF--
<?php
if( substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip Not for Windows');
+ die('skip Not for Windows');
}
require __DIR__ . '/../skipif_root.inc';
?>
--SKIPIF--
<?php
if( substr(PHP_OS, 0, 3) == 'WIN') {
- die('skip Not for Windows');
+ die('skip Not for Windows');
}
require __DIR__ . '/../skipif_root.inc';
?>
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
}
exec('net session 2>&1', $out, $status);
if (!$status) {
- die('skip test runs under an elevated user account');
+ die('skip test runs under an elevated user account');
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
include_once __DIR__ . '/windows_links/common.inc';
skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(__FILE__);
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
if (!$php) {
- die("skip No php executable defined\n");
+ die("skip No php executable defined\n");
}
?>
--FILE--
<?php
chdir("/");
if (!@mkdir("testtmpskipifdir")) {
- die("skip for root only");
+ die("skip for root only");
}
rmdir("testtmpskipifdir");
if (!function_exists("chroot")) {
- die("skip chroot() not available");
+ die("skip chroot() not available");
}
?>
--FILE--
display_errors=false
--SKIPIF--
<?php
- if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+ if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
?>
--FILE--
<?php
die("skip Run only on Windows");
if (!is_writable('c:\\')) {
- die('skip. C:\\ not writable.');
+ die('skip. C:\\ not writable.');
}
?>
if(substr(PHP_OS, 0, 3) != "WIN")
die("skip Run only on Windows");
if (!is_writable('c:\\')) {
- die('skip. C:\\ not writable.');
+ die('skip. C:\\ not writable.');
}
?>
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
?>
--FILE--
<?php
chdir("/");
if (!@mkdir("testtmpskipifdir")) {
- die("skip for root only");
+ die("skip for root only");
}
rmdir("testtmpskipifdir");
?>
<?php
chdir("/");
if (!@mkdir("testtmpskipifdir")) {
- die("skip for root only");
+ die("skip for root only");
}
rmdir("testtmpskipifdir");
?>
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip run only on Windows");
+ die("skip run only on Windows");
?>
--CONFLICTS--
obscure_filename
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+ die('skip windows only test');
}
include_once __DIR__ . '/common.inc';
$ret = exec(get_junction().' /? 2>&1', $out);
if (strpos($out[0], 'recognized')) {
- die('skip. junction.exe not found in PATH.');
+ die('skip. junction.exe not found in PATH.');
}
?>
}
function skipIfSeCreateSymbolicLinkPrivilegeIsDisabled(string $filename) {
- $ln = "$filename.lnk";
- $ret = exec("mklink $ln " . __FILE__ .' 2>&1', $out);
- @unlink($ln);
- if (strpos($ret, 'privilege') !== false) {
- die('skip SeCreateSymbolicLinkPrivilege not enabled');
- }
+ $ln = "$filename.lnk";
+ $ret = exec("mklink $ln " . __FILE__ .' 2>&1', $out);
+ @unlink($ln);
+ if (strpos($ret, 'privilege') !== false) {
+ die('skip SeCreateSymbolicLinkPrivilege not enabled');
+ }
}
$obj = scandir($d0);
foreach ($obj as $file) {
- if ("." == $file || ".." == $file) continue;
- unlink($d0 . DIRECTORY_SEPARATOR . $file);
+ if ("." == $file || ".." == $file) continue;
+ unlink($d0 . DIRECTORY_SEPARATOR . $file);
}
rmdir($d0);
$start = realpath(__DIR__);
if (strlen($start) > 260 || strlen($start) > 248) {
- die("skip the starting path length is unsuitable for this test");
+ die("skip the starting path length is unsuitable for this test");
}
?>
stream_filter_append($stream, 'convert.quoted-printable-decode', STREAM_FILTER_WRITE, ['line-break-chars' => "\r\n"]);
$lines = [
- "\r\n",
- " -=()\r\n",
- " -=\r\n",
- "\r\n"
- ];
+ "\r\n",
+ " -=()\r\n",
+ " -=\r\n",
+ "\r\n"
+ ];
foreach ($lines as $line) {
- fwrite($stream, $line);
+ fwrite($stream, $line);
}
fclose($stream);
$tmp_dir = __DIR__ . '/bug41518';
mkdir($tmp_dir);
if (!is_dir($tmp_dir)) {
- die("skip");
+ die("skip");
}
@unlink($tmp_dir);
?>
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
- die('skip dl() is not enabled for ' . php_sapi_name());
+ die('skip dl() is not enabled for ' . php_sapi_name());
}
?>
--INI--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
- die('skip dl() is not enabled for ' . php_sapi_name());
+ die('skip dl() is not enabled for ' . php_sapi_name());
}
?>
--INI--
<?php
$enabled_sapi = array('cgi-fcgi', 'cli', 'embed', 'fpm');
if (!in_array(php_sapi_name(), $enabled_sapi)) {
- die('skip dl() is not enabled for ' . php_sapi_name());
+ die('skip dl() is not enabled for ' . php_sapi_name());
}
?>
--INI--
/* No function_exists() check, proc_nice() is always available on Windows */
if (!defined('PHP_WINDOWS_VERSION_MAJOR')) {
- die('skip: Only for Windows');
+ die('skip: Only for Windows');
}
if (getenv('SKIP_SLOW_TESTS')) {
- doe('skip: Slow test');
+ doe('skip: Slow test');
}
?>
--FILE--
Simone Gentili (sensorario@gmail.com)
--SKIPIF--
<?php
- if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
- if(!function_exists('posix_geteuid')) die("skip. posix_geteuid not available ");
- if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
+ if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
+ if(!function_exists('posix_geteuid')) die("skip. posix_geteuid not available ");
+ if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
?>
--FILE--
<?php
<?php
$cmd = [
- getenv("TEST_PHP_EXECUTABLE"),
- __DIR__ . '/proc_open_sockets1.inc'
+ getenv("TEST_PHP_EXECUTABLE"),
+ __DIR__ . '/proc_open_sockets1.inc'
];
$spec = [
- ['null'],
- ['socket'],
- ['socket']
+ ['null'],
+ ['socket'],
+ ['socket']
];
$proc = proc_open($cmd, $spec, $pipes);
foreach ($pipes as $pipe) {
- var_dump(stream_set_blocking($pipe, false));
+ var_dump(stream_set_blocking($pipe, false));
}
while ($pipes) {
- $r = $pipes;
- $w = null;
- $e = null;
-
- if (!stream_select($r, $w, $e, null, 0)) {
- throw new Error("Select failed");
- }
-
- foreach ($r as $i => $pipe) {
- if (!is_resource($pipe) || feof($pipe)) {
- unset($pipes[$i]);
- continue;
- }
-
- $chunk = @fread($pipe, 8192);
-
- if ($chunk === false) {
- throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
- }
-
- if ($chunk !== '') {
- echo "PIPE {$i} << {$chunk}\n";
- }
- }
+ $r = $pipes;
+ $w = null;
+ $e = null;
+
+ if (!stream_select($r, $w, $e, null, 0)) {
+ throw new Error("Select failed");
+ }
+
+ foreach ($r as $i => $pipe) {
+ if (!is_resource($pipe) || feof($pipe)) {
+ unset($pipes[$i]);
+ continue;
+ }
+
+ $chunk = @fread($pipe, 8192);
+
+ if ($chunk === false) {
+ throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
+ }
+
+ if ($chunk !== '') {
+ echo "PIPE {$i} << {$chunk}\n";
+ }
+ }
}
?>
function poll($pipe, $read = true)
{
- $r = ($read == true) ? [$pipe] : null;
- $w = ($read == false) ? [$pipe] : null;
- $e = null;
-
- if (!stream_select($r, $w, $e, null, 0)) {
- throw new \Error("Select failed");
- }
+ $r = ($read == true) ? [$pipe] : null;
+ $w = ($read == false) ? [$pipe] : null;
+ $e = null;
+
+ if (!stream_select($r, $w, $e, null, 0)) {
+ throw new \Error("Select failed");
+ }
}
function read_pipe($pipe): string
{
- poll($pipe);
-
- if (false === ($chunk = @fread($pipe, 8192))) {
- throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
- }
-
- return $chunk;
+ poll($pipe);
+
+ if (false === ($chunk = @fread($pipe, 8192))) {
+ throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
+ }
+
+ return $chunk;
}
function write_pipe($pipe, $data)
{
- poll($pipe, false);
-
- if (false == @fwrite($pipe, $data)) {
- throw new Error("Failed to write: " . (error_get_last()['message'] ?? 'N/A'));
- }
+ poll($pipe, false);
+
+ if (false == @fwrite($pipe, $data)) {
+ throw new Error("Failed to write: " . (error_get_last()['message'] ?? 'N/A'));
+ }
}
$cmd = [
- getenv("TEST_PHP_EXECUTABLE"),
- __DIR__ . '/proc_open_sockets2.inc'
+ getenv("TEST_PHP_EXECUTABLE"),
+ __DIR__ . '/proc_open_sockets2.inc'
];
$spec = [
- ['socket'],
- ['socket']
+ ['socket'],
+ ['socket']
];
$proc = proc_open($cmd, $spec, $pipes);
foreach ($pipes as $pipe) {
- var_dump(stream_set_blocking($pipe, false));
+ var_dump(stream_set_blocking($pipe, false));
}
printf("STDOUT << %s\n", read_pipe($pipes[1]));
function poll($pipe, $read = true)
{
- $r = ($read == true) ? [$pipe] : null;
- $w = ($read == false) ? [$pipe] : null;
- $e = null;
-
- if (!stream_select($r, $w, $e, null, 0)) {
- throw new \Error("Select failed");
- }
+ $r = ($read == true) ? [$pipe] : null;
+ $w = ($read == false) ? [$pipe] : null;
+ $e = null;
+
+ if (!stream_select($r, $w, $e, null, 0)) {
+ throw new \Error("Select failed");
+ }
}
function read_pipe($pipe): string
{
- poll($pipe);
-
- if (false === ($chunk = @fread($pipe, 8192))) {
- throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
- }
-
- return $chunk;
+ poll($pipe);
+
+ if (false === ($chunk = @fread($pipe, 8192))) {
+ throw new Error("Failed to read: " . (error_get_last()['message'] ?? 'N/A'));
+ }
+
+ return $chunk;
}
$cmd = [
- getenv("TEST_PHP_EXECUTABLE"),
- __DIR__ . '/proc_open_sockets2.inc'
+ getenv("TEST_PHP_EXECUTABLE"),
+ __DIR__ . '/proc_open_sockets2.inc'
];
$spec = [
- ['pipe', 'r'],
- ['socket']
+ ['pipe', 'r'],
+ ['socket']
];
$proc = proc_open($cmd, $spec, $pipes);
die("skip Valid only on Windows");
}
if (!sapi_windows_cp_set(936)) {
- die("skip Required CP 936 or compatible");
+ die("skip Required CP 936 or compatible");
}
?>
GetImageSize()
--SKIPIF--
<?php
- require_once('skipif_imagetype.inc');
+ require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
GetImageSize() with 246x247 pixels
--SKIPIF--
<?php
- require_once('skipif_imagetype.inc');
+ require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
GetImageSize() with 384x385 pixels
--SKIPIF--
<?php
- require_once('skipif_imagetype.inc');
+ require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
GetImageSize() for compressed swf files
--SKIPIF--
<?php
- if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
- die("skip zlib extension is not available");
- }
+ if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
+ die("skip zlib extension is not available");
+ }
?>
--FILE--
<?php
Test getimagesize() function : variation - For shockwave-flash format
--SKIPIF--
<?php
- if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
- die("skip zlib extension is not available");
- }
+ if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
+ die("skip zlib extension is not available");
+ }
?>
--FILE--
<?php
Test getimagesize() function : basic functionality for shockwave-flash
--SKIPIF--
<?php
- if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
- die("skip zlib extension is not available or SWC not supported");
- }
+ if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
+ die("skip zlib extension is not available or SWC not supported");
+ }
?>
--FILE--
<?php
image_type_to_mime_type()
--SKIPIF--
<?php
- require_once('skipif_imagetype.inc');
+ require_once('skipif_imagetype.inc');
?>
--FILE--
<?php
Test image_type_to_mime_type() function : usage variations - Passing IMAGETYPE_ICO and IMAGETYPE_SWC
--SKIPIF--
<?php
- if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
- die("skip zlib extension is not available or IMAGETYPE_SWC is not defined ");
- }
+ if (!defined("IMAGETYPE_SWC") || !extension_loaded('zlib')) {
+ die("skip zlib extension is not available or IMAGETYPE_SWC is not defined ");
+ }
?>
--FILE--
<?php
Bug #25665 (var_dump () hangs on Nan and INF)
--SKIPIF--
<?php
- $OS = strtoupper(PHP_OS);
- if ($OS == 'SUNOS' || $OS == 'SOLARIS') die("SKIP Solaris acos() returns wrong value");
+ $OS = strtoupper(PHP_OS);
+ if ($OS == 'SUNOS' || $OS == 'SOLARIS') die("SKIP Solaris acos() returns wrong value");
?>
--FILE--
<?php
$packed = str_repeat(chr(0), 15) . chr(1);
if (@inet_ntop($packed) === false) {
- die("skip no IPv6 support");
+ die("skip no IPv6 support");
}
if (stristr(PHP_OS, "darwin") !== false) die("skip MacOS has broken inet_*() funcs");
?>
stream_socket_shutdown() test on IPv4 TCP Loopback
--SKIPIF--
<?php
- function_exists('stream_socket_shutdown') or die('skip stream_socket_shutdown() is not supported.');
+ function_exists('stream_socket_shutdown') or die('skip stream_socket_shutdown() is not supported.');
?>
--FILE--
<?php
Streams Based IPv6 TCP Loopback test
--SKIPIF--
<?php
- /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused (or code 10049 on Windows).
- If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error)
- Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */
- @stream_socket_client('tcp://[::1]:0', $errno);
- if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
- die('skip IPv6 is not supported.');
- }
+ /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused (or code 10049 on Windows).
+ If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error)
+ Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */
+ @stream_socket_client('tcp://[::1]:0', $errno);
+ if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
+ die('skip IPv6 is not supported.');
+ }
?>
--FILE--
<?php
Streams Based Unix Domain Datagram Loopback test
--SKIPIF--
<?php
- if (array_search("udg",stream_get_transports()) === false)
- die('SKIP No support for UNIX domain sockets.');
+ if (array_search("udg",stream_get_transports()) === false)
+ die('SKIP No support for UNIX domain sockets.');
?>
--FILE--
<?php
Streams Based IPv6 UDP Loopback test
--SKIPIF--
<?php
- /* If IPv6 is supported on the platform this will error out with code 111 -
- * Connection refused (or code 10049 on Windows). If IPv6 is NOT supported, $errno will be set to
- * something else (indicating parse/getaddrinfo error)
- * Note: Might be a good idea to export an IPv6 support indicator
- * (such as AF_INET6 exported by ext/sockets), however, since we
- * cannot tell for sure if IPv6 works until we probe it at run time,
- * this isn't really practical.
- */
+ /* If IPv6 is supported on the platform this will error out with code 111 -
+ * Connection refused (or code 10049 on Windows). If IPv6 is NOT supported, $errno will be set to
+ * something else (indicating parse/getaddrinfo error)
+ * Note: Might be a good idea to export an IPv6 support indicator
+ * (such as AF_INET6 exported by ext/sockets), however, since we
+ * cannot tell for sure if IPv6 works until we probe it at run time,
+ * this isn't really practical.
+ */
- @stream_socket_client('tcp://[::1]:0', $errno);
- if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
- die('skip IPv6 is not supported.');
- }
+ @stream_socket_client('tcp://[::1]:0', $errno);
+ if ((PHP_OS_FAMILY === 'Windows' && $errno !== 10049) || (PHP_OS_FAMILY !== 'Windows' && $errno !== 111)) {
+ die('skip IPv6 is not supported.');
+ }
?>
--FILE--
<?php
Streams Based Unix Domain Loopback test
--SKIPIF--
<?php
- if (array_search("unix",stream_get_transports()) === false)
- die('SKIP No support for UNIX domain sockets.');
+ if (array_search("unix",stream_get_transports()) === false)
+ die('SKIP No support for UNIX domain sockets.');
?>
--FILE--
<?php
Bug #26762 (unserialize() produces lowercase classnames)
--SKIPIF--
<?php
- if (class_exists('autoload_root')) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root')) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
Bug #30234 (__autoload() not invoked for interfaces)
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (pack('s', 1) != "\x01\x00")
- die("skip test for little-endian architectures");
+ die("skip test for little-endian architectures");
--FILE--
<?php
--SKIPIF--
<?php
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip non windows test');
+ die('skip non windows test');
}
--FILE--
<?php
--SKIPIF--
<?php
if(!file_exists(__DIR__."/../../../../sapi/cli/tests/php_cli_server.inc"))
- die("skip could not found cli server script");
+ die("skip could not found cli server script");
$res = @include __DIR__."/../../../../sapi/cli/tests/php_cli_server.inc";
if(!$res) {
- die("skip could not open cli server script");
+ die("skip could not open cli server script");
}
?>
--CONFLICTS--
Bug #51800 proc_open on Windows hangs forever
--SKIPIF--
<?php
- echo 'skip expected to fail or take too long';
- if (getenv("SKIP_SLOW_TESTS")) {
- die("skip slow test");
- }
+ echo 'skip expected to fail or take too long';
+ if (getenv("SKIP_SLOW_TESTS")) {
+ die("skip slow test");
+ }
?>
--XFAIL--
pipes have to be read/written simultaneously
die('skip Windows only');
}
if (PHP_WINDOWS_VERSION_MAJOR < 10) {
- die("skip for Windows 10 and above");
+ die("skip for Windows 10 and above");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("session")) {
- die("skip");
+ die("skip");
}
?>
--FILE--
<?php
$result = (bool)setlocale(LC_CTYPE, "fr_FR.ISO-8859-15", "fr_FR.ISO8859-15", 'fr_FR@euro');
if (!$result) {
- die("skip setlocale() failed\n");
+ die("skip setlocale() failed\n");
}
?>
--INI--
<?php
$result = (bool)setlocale(LC_CTYPE, "de_DE.ISO-8859-1", "de_DE.ISO8859-1");
if (!$result || preg_match('/ISO/i', setlocale(LC_CTYPE, 0)) == 0) {
- die("skip setlocale() failed\n");
+ die("skip setlocale() failed\n");
}
?>
--INI--
internal_encoding=cp1252
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
--FILE--
<?php
print mb_internal_encoding()."\n";
internal_encoding=ISO-8859-15
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
--FILE--
<?php
mb_internal_encoding('ISO-8859-15');
internal_encoding=ISO-8859-1
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
--FILE--
<?php
mb_internal_encoding('ISO-8859-1');
internal_encoding=EUC-JP
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
--FILE--
<?php
mb_internal_encoding('EUC-JP');
internal_encoding=Shift_JIS
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
--FILE--
<?php
mb_internal_encoding('Shift_JIS');
internal_encoding=cp1251
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
?>
--FILE--
<?php
mbstring.internal_encoding=ISO-8859-1
--SKIPIF--
<?php
- extension_loaded("mbstring") or die("skip mbstring not available\n");
+ extension_loaded("mbstring") or die("skip mbstring not available\n");
?>
--FILE--
<?php
--SKIPIF--
<?php
if (PHP_INT_MAX > 2147483647) {
- die("skip 32bit test only");
+ die("skip 32bit test only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE < 8) {
- die("skip 64bit test only");
+ die("skip 64bit test only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE > 4) {
- die("skip 32bit test only");
+ die("skip 32bit test only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
--SKIPIF--
<?php
if (PHP_INT_SIZE != 4) {
- die("skip this test is for 32bit platform only");
+ die("skip this test is for 32bit platform only");
}
?>
--FILE--
microtime() function
--SKIPIF--
<?php
- if (!function_exists('microtime')) die('skip microtime() not available');
+ if (!function_exists('microtime')) die('skip microtime() not available');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!function_exists('strptime')) {
- echo "SKIP strptime function not available in build";
+ echo "SKIP strptime function not available in build";
}
?>
--FILE--
--SKIPIF--
<?php
if(!extension_loaded('sysvsem') || !extension_loaded('pcntl')) {
- die("skip sysvsem and pcntl required");
+ die("skip sysvsem and pcntl required");
}
?>
--FILE--
--SKIPIF--
<?php
if(!extension_loaded('sysvsem') || !extension_loaded('sysvshm')) {
- die("skip Both sysvsem and sysvshm required");
+ die("skip Both sysvsem and sysvshm required");
}
?>
--FILE--
require_once("skipif.inc");
if (!extension_loaded('iconv')) die ("skip iconv extension not available");
if (ICONV_IMPL == 'glibc' && version_compare(ICONV_VERSION, '2.12', '<='))
- die("skip iconv of glibc <= 2.12 is buggy");
+ die("skip iconv of glibc <= 2.12 is buggy");
?>
--FILE--
<?php
include("skipif.inc");
if(strtoupper("äöüß") != "ÄÖÜß")
{
- die("skip strtoupper on non-ascii not supported on this platform");
+ die("skip strtoupper on non-ascii not supported on this platform");
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("xml")) {
- print "skip - XML extension not loaded";
+ print "skip - XML extension not loaded";
}
?>
--FILE--
--TEST--
#79029 (Use After Free's in XMLReader / XMLWriter)
--SKIPIF--
-<?php
+<?php
if (!extension_loaded("xmlwriter")) print "skip xmlwriter extension not available";
if (!extension_loaded("xmlreader")) print "skip xmlreader extension not available";
?>
Test phpinfo() displays xsl info
--SKIPIF--
<?php
- if (!extension_loaded("xsl")) {
- die("SKIP extension gettext not loaded\n");
- }
+ if (!extension_loaded("xsl")) {
+ die("SKIP extension gettext not loaded\n");
+ }
?>
--FILE--
<?php
Test 8: Stream Wrapper Includes
--SKIPIF--
<?php
- require_once __DIR__ .'/skipif.inc';
- if (!extension_loaded('zlib')) die('skip zlib extension not available');
+ require_once __DIR__ .'/skipif.inc';
+ if (!extension_loaded('zlib')) die('skip zlib extension not available');
?>
--FILE--
<?php
Test 8: Stream Wrapper Includes
--SKIPIF--
<?php
- require_once __DIR__ .'/skipif.inc';
- if (!extension_loaded('zlib')) die('skip zlib extension not available');
+ require_once __DIR__ .'/skipif.inc';
+ if (!extension_loaded('zlib')) die('skip zlib extension not available');
?>
--FILE--
<?php
Test 9: Stream Wrapper XPath-Document()
--SKIPIF--
<?php
- require_once __DIR__ .'/skipif.inc';
- if (!extension_loaded('zlib')) die('skip zlib extension not available');
+ require_once __DIR__ .'/skipif.inc';
+ if (!extension_loaded('zlib')) die('skip zlib extension not available');
?>
--FILE--
<?php
function doSomething() {
$generator = fooResults();
-
+
while($generator->current() !== NULL) {
echo $generator->current() . PHP_EOL;
if ($generator->current() === 5) {
$a = glob("$base_path/51353_unpack/*.txt");
foreach($a as $f) {
- unlink($f);
+ unlink($f);
}
rmdir("$base_path/51353_unpack");
?>
Bug #64342 ZipArchive::addFile() has to check file existence (variation 1)
--SKIPIF--
<?php
- if(!extension_loaded('zip')) die('skip');
+ if(!extension_loaded('zip')) die('skip');
?>
--FILE--
<?php
--SKIPIF--
<?php
if (!extension_loaded('zlib')) {
- die('skip - zlib extension not loaded');
+ die('skip - zlib extension not loaded');
}
?>
--FILE--
gzopen('someFile', 'c');
--CLEAN--
<?php
- unlink('someFile');
+ unlink('someFile');
?>
--EXPECTF--
Warning: gzopen(): gzopen failed in %s on line %d
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
}
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
}
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
if (PHP_OS == "Darwin") {
}
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
include 'func.inc';
if (version_compare(get_zlib_version(), "1.2.11") < 0) {
- die("skip - at least zlib 1.2.11 required, got " . get_zlib_version());
+ die("skip - at least zlib 1.2.11 required, got " . get_zlib_version());
}
?>
--FILE--
}
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
if (PHP_OS == "Darwin") {
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
include 'func.inc';
if (version_compare(get_zlib_version(), '1.2.5') > 0) {
- die('skip - only for zlib <= 1.2.5');
+ die('skip - only for zlib <= 1.2.5');
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
include 'func.inc';
if (version_compare(get_zlib_version(), '1.2.7') < 0) {
- die('skip - only for zlib >= 1.2.7');
+ die('skip - only for zlib >= 1.2.7');
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
--SKIPIF--
<?php
if (!extension_loaded("zlib")) {
- print "skip - ZLIB extension not loaded";
+ print "skip - ZLIB extension not loaded";
}
?>
--FILE--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
include "skipif.inc";
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
- die ("skip Windows only");
+ die ("skip Windows only");
}
include "skipif.inc";
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
include "skipif.inc";
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (!extension_loaded("session")) {
- die("skip session extension required");
+ die("skip session extension required");
}
if (PCRE_JIT_SUPPORT == false) {
- die ("skip not pcre jit support builtin");
+ die ("skip not pcre jit support builtin");
}
?>
--INI--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (!extension_loaded('readline') || readline_info('done') === NULL) {
- die ("skip need readline support");
+ die ("skip need readline support");
}
?>
--FILE--
<?php
include "skipif.inc";
if (!extension_loaded('readline') || readline_info('done') !== NULL) {
- die ("skip need readline support using libedit");
+ die ("skip need readline support using libedit");
}
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
die('skip not for Windows');
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include "skipif.inc";
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
?>
--FILE--
<?php
include 'skipif.inc';
if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
+ die ("skip not for Windows");
}
if (strlen("#!".getenv('TEST_PHP_EXECUTABLE')) > 127) {
include "skipif.inc";
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
- die("skip this test is for Windows platforms only");
+ die("skip this test is for Windows platforms only");
}
$php = dirname(getenv('TEST_PHP_EXECUTABLE')) . DIRECTORY_SEPARATOR . "php-win.exe";
if (!file_exists($php)) {
- die("skip php-win.exe doesn't exist");
+ die("skip php-win.exe doesn't exist");
}
?>
--SKIPIF--
<?php
if (false == setlocale(LC_CTYPE, "UTF8", "en_US.UTF-8")) {
- die("skip setlocale() failed\n");
+ die("skip setlocale() failed\n");
}
?>
--FILE--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == "WIN") {
- die("skip non windows test");
+ die("skip non windows test");
}
if (!extension_loaded("readline") || !readline_info("done")) {
- die("skip readline support required");
+ die("skip readline support required");
}
exec('which expect', $output, $ret);
if ($ret) {
- die("skip no expect installed");
+ die("skip no expect installed");
}
?>
--FILE--
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == "WIN") {
- die("skip non windows test");
+ die("skip non windows test");
}
?>
--FILE--
<?php
register_shutdown_function(function() {
- die(111);
+ die(111);
});
die(222);
include "skipif.inc";
if (PHP_INT_SIZE < 8) {
- die("skip need PHP_INT_SIZE>=8");
+ die("skip need PHP_INT_SIZE>=8");
}
if (disk_free_space(sys_get_temp_dir()) < 2300000000) {
- die("skip need more than 2.15G of free disk space for the uploaded file");
+ die("skip need more than 2.15G of free disk space for the uploaded file");
}
if (!file_exists('/proc/meminfo')) {
- die('skip Cannot check free RAM from /proc/meminfo on this platform');
+ die('skip Cannot check free RAM from /proc/meminfo on this platform');
}
$free_ram = 0;
if ($f = fopen("/proc/meminfo","r")) {
- while (!feof($f)) {
- if (preg_match('/MemFree[^\d]*(\d+)/i', fgets($f), $m)) {
- $free_ram = max($free_ram, $m[1]/1024/1024);
- if ($free_ram > 3) {
- $enough_free_ram = true;
- }
- }
- }
+ while (!feof($f)) {
+ if (preg_match('/MemFree[^\d]*(\d+)/i', fgets($f), $m)) {
+ $free_ram = max($free_ram, $m[1]/1024/1024);
+ if ($free_ram > 3) {
+ $enough_free_ram = true;
+ }
+ }
+ }
}
if (empty($enough_free_ram)) {
- die(sprintf("skip need +3G free RAM, but only %01.2f available", $free_ram));
+ die(sprintf("skip need +3G free RAM, but only %01.2f available", $free_ram));
}
if (getenv('TRAVIS')) {
ZE2 Autoload and class_exists
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
ZE2 Autoload and get_class_methods
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
ZE2 Autoload and derived classes
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
ZE2 Autoload and recursion
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
ZE2 Autoload from destructor
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
ZE2 Autoload from destructor
--SKIPIF--
<?php
- if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
+ if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
?>
--FILE--
<?php
--SKIPIF--
<?php # try to activate a german locale
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
- print "skip Can't find german locale";
+ print "skip Can't find german locale";
}
?>
--FILE--
--SKIPIF--
<?php # try to activate a german locale
if (setlocale(LC_NUMERIC, "de_DE.UTF-8", "de_DE", "de", "german", "ge", "de_DE.ISO-8859-1") === FALSE) {
- print "skip setlocale() failed";
+ print "skip setlocale() failed";
} elseif (strtolower(php_uname('s')) == 'darwin') {
print "skip ok to fail on MacOS X";
}
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) >= 0) {
- echo "skip Only for Windows systems < 10.0.10586";
+ echo "skip Only for Windows systems < 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
if(PHP_OS_FAMILY !== "Windows") {
echo "skip Only for Windows systems";
} elseif (version_compare(
PHP_WINDOWS_VERSION_MAJOR.'.'.PHP_WINDOWS_VERSION_MINOR.'.'.PHP_WINDOWS_VERSION_BUILD,
- '10.0.10586'
+ '10.0.10586'
) < 0) {
- echo "skip Only for Windows systems >= 10.0.10586";
+ echo "skip Only for Windows systems >= 10.0.10586";
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
--SKIPIF--
<?php
if (getenv("SKIP_IO_CAPTURE_TESTS")) {
- die("skip I/O capture test");
+ die("skip I/O capture test");
}
?>
--CAPTURE_STDIO--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
if (false !== stripos(`$php -n -m`, 'openssl')) {
- die('skip openssl is built static');
+ die('skip openssl is built static');
}
$ext_module = ini_get('extension_dir') . DIRECTORY_SEPARATOR . (substr(PHP_OS, 0, 3) === "WIN" ? "php_openssl." : "openssl.") . PHP_SHLIB_SUFFIX;
if( !file_exists($ext_module) ) die('skip openssl shared extension not found');
--SKIPIF--
<?php
if(PHP_OS_FAMILY === "Windows") {
- die('skip.. only for unix');
+ die('skip.. only for unix');
}
if (!is_dir("/usr/local/bin")) {
- die('skip.. no /usr/local/bin on this machine');
+ die('skip.. no /usr/local/bin on this machine');
}
--INI--
open_basedir=/usr/local