diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 249cd553bab53..1815a9c264b21 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -23,6 +23,8 @@ PHP 8.0 INTERNALS UPGRADE NOTES t. Signature changes u. Error Notification callbacks to replace zend_error_cb overwrite use-cases v. Removed Zend APIs + w. Renamed Zend APIs + x. ZEND_EXT_NOP no longer emitted 2. Build system changes a. Abstract @@ -395,6 +397,10 @@ PHP 8.0 INTERNALS UPGRADE NOTES w. The following APIs have been renamed: - _zend_ts_hash_init() to zend_ts_hash_init() + x. In COMPILE_EXTENDED_STMT mode, a ZEND_EXT_NOP opcode will no longer be + generated at the start of a function. Use the new observer APIs or hook + into zend_execute_ex instead. + ======================== 2. Build system changes ======================== diff --git a/Zend/tests/attributes/001_placement.phpt b/Zend/tests/attributes/001_placement.phpt index 7de2210460e52..518c890ef2c4a 100644 --- a/Zend/tests/attributes/001_placement.phpt +++ b/Zend/tests/attributes/001_placement.phpt @@ -41,8 +41,8 @@ $sources = [ ]; foreach ($sources as $r) { - $attr = $r->getAttributes(); - var_dump(get_class($r), count($attr)); + $attr = $r->getAttributes(); + var_dump(get_class($r), count($attr)); foreach ($attr as $a) { var_dump($a->getName(), $a->getArguments()); diff --git a/Zend/tests/attributes/003_ast_nodes.phpt b/Zend/tests/attributes/003_ast_nodes.phpt index 0177804dcc85a..854edf3d63c15 100644 --- a/Zend/tests/attributes/003_ast_nodes.phpt +++ b/Zend/tests/attributes/003_ast_nodes.phpt @@ -8,7 +8,7 @@ define('V1', strtoupper(php_sapi_name())); #[A1([V1 => V1])] class C1 { - public const BAR = 'bar'; + public const BAR = 'bar'; } $ref = new \ReflectionClass(C1::class); @@ -38,7 +38,7 @@ echo "\n"; #[A1(self::FOO, C1::BAR)] class C3 { - private const FOO = 'foo'; + private const FOO = 'foo'; } $ref = new \ReflectionClass(C3::class); @@ -62,7 +62,7 @@ echo "\n"; #[Attribute] class C5 { - public function __construct() { } + public function __construct() { } } $ref = new \ReflectionFunction(#[C5(MissingClass::SOME_CONST)] function () { }); @@ -70,15 +70,15 @@ $attr = $ref->getAttributes(); var_dump(count($attr)); try { - $attr[0]->getArguments(); + $attr[0]->getArguments(); } catch (\Error $e) { - var_dump($e->getMessage()); + var_dump($e->getMessage()); } try { - $attr[0]->newInstance(); + $attr[0]->newInstance(); } catch (\Error $e) { - var_dump($e->getMessage()); + var_dump($e->getMessage()); } ?> diff --git a/Zend/tests/attributes/005_objects.phpt b/Zend/tests/attributes/005_objects.phpt index 206d89fa10ab7..62b14181efd2e 100644 --- a/Zend/tests/attributes/005_objects.phpt +++ b/Zend/tests/attributes/005_objects.phpt @@ -6,22 +6,22 @@ Attributes can be converted into objects. #[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"; @@ -29,9 +29,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A1] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\ArgumentCountError $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } echo "\n"; @@ -39,9 +39,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A1([])] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\TypeError $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } echo "\n"; @@ -49,9 +49,9 @@ echo "\n"; $ref = new \ReflectionFunction(#[A2] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 3', $e->getMessage()); + var_dump('ERROR 3', $e->getMessage()); } echo "\n"; @@ -59,15 +59,15 @@ echo "\n"; #[Attribute] class A3 { - private function __construct() { } + private function __construct() { } } $ref = new \ReflectionFunction(#[A3] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 4', $e->getMessage()); + var_dump('ERROR 4', $e->getMessage()); } echo "\n"; @@ -78,9 +78,9 @@ class A4 { } $ref = new \ReflectionFunction(#[A4(1)] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 5', $e->getMessage()); + var_dump('ERROR 5', $e->getMessage()); } echo "\n"; @@ -90,9 +90,9 @@ class A5 { } $ref = new \ReflectionFunction(#[A5] function () { }); try { - $ref->getAttributes()[0]->newInstance(); + $ref->getAttributes()[0]->newInstance(); } catch (\Error $e) { - var_dump('ERROR 6', $e->getMessage()); + var_dump('ERROR 6', $e->getMessage()); } ?> diff --git a/Zend/tests/attributes/006_filter.phpt b/Zend/tests/attributes/006_filter.phpt index 8da1ec9bde1e1..2924e6ed79826 100644 --- a/Zend/tests/attributes/006_filter.phpt +++ b/Zend/tests/attributes/006_filter.phpt @@ -55,17 +55,17 @@ echo "\n"; $ref = new \ReflectionFunction(function () { }); try { - $ref->getAttributes(A1::class, 3); + $ref->getAttributes(A1::class, 3); } catch (\Error $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } $ref = new \ReflectionFunction(function () { }); try { - $ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF); + $ref->getAttributes(SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF); } catch (\Error $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } ?> diff --git a/Zend/tests/attributes/011_inheritance.phpt b/Zend/tests/attributes/011_inheritance.phpt index 36ee3fa47addf..6a589b9253d08 100644 --- a/Zend/tests/attributes/011_inheritance.phpt +++ b/Zend/tests/attributes/011_inheritance.phpt @@ -6,19 +6,19 @@ Attributes comply with inheritance rules. #[A2] class C1 { - #[A1] - public function foo() { } + #[A1] + public function foo() { } } class C2 extends C1 { - public function foo() { } + public function foo() { } } class C3 extends C1 { - #[A1] - public function bar() { } + #[A1] + public function bar() { } } $ref = new \ReflectionClass(C1::class); @@ -37,20 +37,20 @@ echo "\n"; trait T1 { - #[A2] - public $a; + #[A2] + public $a; } class C4 { - use T1; + use T1; } class C5 { - use T1; + use T1; - public $a; + public $a; } $ref = new \ReflectionClass(T1::class); diff --git a/Zend/tests/attributes/012_ast_export.phpt b/Zend/tests/attributes/012_ast_export.phpt index a9131f92d0c0b..347d1befe7f48 100644 --- a/Zend/tests/attributes/012_ast_export.phpt +++ b/Zend/tests/attributes/012_ast_export.phpt @@ -12,15 +12,15 @@ assert(0 && ($a = #[A1] #[A2] function ($a, #[A3(1)] $b) { })); assert(0 && ($a = #[A1(1, 2, 1 + 2)] fn () => 1)); assert(0 && ($a = new #[A1] class() { - #[A1]#[A2] const FOO = 'foo'; - #[A2] public $x; - #[A3] function a() { } + #[A1]#[A2] const FOO = 'foo'; + #[A2] public $x; + #[A3] function a() { } })); assert(0 && ($a = function () { - #[A1] class Test1 { } - #[A2] interface Test2 { } - #[A3] trait Test3 { } + #[A1] class Test1 { } + #[A2] interface Test2 { } + #[A3] trait Test3 { } })); ?> diff --git a/Zend/tests/attributes/013_class_scope.phpt b/Zend/tests/attributes/013_class_scope.phpt index 61dd9f594c708..ff16bb7b82258 100644 --- a/Zend/tests/attributes/013_class_scope.phpt +++ b/Zend/tests/attributes/013_class_scope.phpt @@ -6,14 +6,14 @@ Attributes make use of class scope. #[A1(self::class, self::FOO)] class C1 { - #[A1(self::class, self::FOO)] - private const FOO = 'foo'; + #[A1(self::class, self::FOO)] + private const FOO = 'foo'; - #[A1(self::class, self::FOO)] - public $a; + #[A1(self::class, self::FOO)] + public $a; - #[A1(self::class, self::FOO)] - public function bar(#[A1(self::class, self::FOO)] $p) { } + #[A1(self::class, self::FOO)] + public function bar(#[A1(self::class, self::FOO)] $p) { } } $ref = new \ReflectionClass(C1::class); @@ -27,15 +27,15 @@ echo "\n"; trait T1 { - #[A1(self::class, self::FOO)] - public function foo() { } + #[A1(self::class, self::FOO)] + public function foo() { } } class C2 { - use T1; + use T1; - private const FOO = 'bar'; + private const FOO = 'bar'; } $ref = new \ReflectionClass(C2::class); @@ -45,7 +45,7 @@ $ref = new \ReflectionClass(T1::class); $attr = $ref->getMethod('foo')->getAttributes()[0]; try { - $attr->getArguments(); + $attr->getArguments(); } catch (\Error $e) { var_dump('ERROR 1', $e->getMessage()); } @@ -54,17 +54,17 @@ echo "\n"; class C3 { - private const FOO = 'foo'; + private const FOO = 'foo'; - public static function foo() - { - return new #[A1(self::class, self::FOO)] class() { - private const FOO = 'bar'; + public static function foo() + { + return new #[A1(self::class, self::FOO)] class() { + private const FOO = 'bar'; - #[A1(self::class, self::FOO)] - public function bar() { } - }; - } + #[A1(self::class, self::FOO)] + public function bar() { } + }; + } } $ref = new \ReflectionObject(C3::foo()); diff --git a/Zend/tests/attributes/014_class_const_group.phpt b/Zend/tests/attributes/014_class_const_group.phpt index a53ed09c0abd2..9f01d013a7de1 100644 --- a/Zend/tests/attributes/014_class_const_group.phpt +++ b/Zend/tests/attributes/014_class_const_group.phpt @@ -5,8 +5,8 @@ Attributes cannot be applied to groups of class constants. class C1 { - #[A1] - public const A = 1, B = 2; + #[A1] + public const A = 1, B = 2; } ?> diff --git a/Zend/tests/attributes/015_property_group.phpt b/Zend/tests/attributes/015_property_group.phpt index 484d4154cf3a6..b84ded8c38d6d 100644 --- a/Zend/tests/attributes/015_property_group.phpt +++ b/Zend/tests/attributes/015_property_group.phpt @@ -5,8 +5,8 @@ Attributes cannot be applied to groups of properties. class C1 { - #[A1] - public $x, $y; + #[A1] + public $x, $y; } ?> diff --git a/Zend/tests/attributes/017_closure_scope.phpt b/Zend/tests/attributes/017_closure_scope.phpt index af7de8e2e828b..8c39ceede9e61 100644 --- a/Zend/tests/attributes/017_closure_scope.phpt +++ b/Zend/tests/attributes/017_closure_scope.phpt @@ -5,17 +5,17 @@ Attributes make use of closure scope. class Test1 { - private const FOO = 'bar'; + private const FOO = 'bar'; } class C1 { - private const FOO = 'foo'; + private const FOO = 'foo'; - public static function foo() - { - return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { }; - } + public static function foo() + { + return #[A1(self::class, self::FOO)] function (#[A1(self::class, self::FOO)] $p) { }; + } } $ref = new \ReflectionFunction(C1::foo()); diff --git a/Zend/tests/attributes/020_userland_attribute_validation.phpt b/Zend/tests/attributes/020_userland_attribute_validation.phpt index 14a10c39b288b..ce2acb26db161 100644 --- a/Zend/tests/attributes/020_userland_attribute_validation.phpt +++ b/Zend/tests/attributes/020_userland_attribute_validation.phpt @@ -18,9 +18,9 @@ $attr = $ref->getAttributes()[0]; var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_CLASS, $attr->isRepeated()); try { - $attr->newInstance(); + $attr->newInstance(); } catch (\Throwable $e) { - var_dump('ERROR 1', $e->getMessage()); + var_dump('ERROR 1', $e->getMessage()); } echo "\n"; @@ -30,9 +30,9 @@ $attr = $ref->getAttributes()[0]; var_dump($attr->getName(), $attr->getTarget() == Attribute::TARGET_FUNCTION, $attr->isRepeated()); try { - $attr->newInstance(); + $attr->newInstance(); } catch (\Throwable $e) { - var_dump('ERROR 2', $e->getMessage()); + var_dump('ERROR 2', $e->getMessage()); } echo "\n"; diff --git a/Zend/tests/attributes/027_trailing_comma_args.phpt b/Zend/tests/attributes/027_trailing_comma_args.phpt index 226025f359c2c..96966c364de66 100644 --- a/Zend/tests/attributes/027_trailing_comma_args.phpt +++ b/Zend/tests/attributes/027_trailing_comma_args.phpt @@ -4,10 +4,10 @@ Trailing comma in attribute argument list --FILE-- diff --git a/Zend/tests/bug54268.phpt b/Zend/tests/bug54268.phpt index 1680f4ceedb8f..e4ce5c0e3a774 100644 --- a/Zend/tests/bug54268.phpt +++ b/Zend/tests/bug54268.phpt @@ -6,7 +6,7 @@ memory_limit=8M --FILE-- diff --git a/Zend/tests/bug54547.phpt b/Zend/tests/bug54547.phpt index 7cb0cf06647a4..2f6387ca26c1d 100644 --- a/Zend/tests/bug54547.phpt +++ b/Zend/tests/bug54547.phpt @@ -3,7 +3,7 @@ Bug #54547: wrong equality of string numbers near LONG_MAX with 64-bit longs --SKIPIF-- --FILE-- diff --git a/Zend/tests/bug70914.phpt b/Zend/tests/bug70914.phpt index 2ea1b91241919..b8a1c91d36338 100644 --- a/Zend/tests/bug70914.phpt +++ b/Zend/tests/bug70914.phpt @@ -3,7 +3,7 @@ Bug #70914 zend_throw_or_error() format string vulnerability --SKIPIF-- --FILE-- diff --git a/Zend/tests/bug76846.phpt b/Zend/tests/bug76846.phpt index fbef2010338cf..cd837bd860973 100644 --- a/Zend/tests/bug76846.phpt +++ b/Zend/tests/bug76846.phpt @@ -6,7 +6,7 @@ memory_limit=33M --FILE-- diff --git a/Zend/tests/bug79599.phpt b/Zend/tests/bug79599.phpt index b333f153a8cb1..57e5332431f53 100644 --- a/Zend/tests/bug79599.phpt +++ b/Zend/tests/bug79599.phpt @@ -3,23 +3,23 @@ Bug #79599 (coredump in set_error_handler) --FILE-- getMessage()); + var_dump($e->getMessage()); } try{ - test2(); + test2(); }catch(\Exception $e){ - var_dump($e->getMessage()); + var_dump($e->getMessage()); } ?> --EXPECT-- diff --git a/Zend/tests/bug80037.phpt b/Zend/tests/bug80037.phpt index 7bbe6128b3669..d6e057546b381 100644 --- a/Zend/tests/bug80037.phpt +++ b/Zend/tests/bug80037.phpt @@ -5,21 +5,21 @@ Bug #80037: Typed property must not be accessed before initialization when __get final class A { - public string $a; + public string $a; - public static function fromArray(array $props): self - { - $me = new static; - foreach ($props as $k => &$v) { - $me->{$k} = &$v; # try to remove & - } - return $me; - } + public static function fromArray(array $props): self + { + $me = new static; + foreach ($props as $k => &$v) { + $me->{$k} = &$v; # try to remove & + } + return $me; + } - public function __get($name) - { - throw new \LogicException("Property '$name' is not defined."); - } + public function __get($name) + { + throw new \LogicException("Property '$name' is not defined."); + } } var_dump(A::fromArray(['a' => 'foo'])); diff --git a/Zend/tests/dval_to_lval_32.phpt b/Zend/tests/dval_to_lval_32.phpt index 9aeea650605e5..89acf9076ad75 100644 --- a/Zend/tests/dval_to_lval_32.phpt +++ b/Zend/tests/dval_to_lval_32.phpt @@ -3,7 +3,7 @@ zend_dval_to_lval preserves low bits (32 bit long) --SKIPIF-- --FILE-- --FILE-- current()); diff --git a/Zend/tests/magic_methods_011.phpt b/Zend/tests/magic_methods_011.phpt index 5ce536ae403cb..7cd4d4bee1d26 100644 --- a/Zend/tests/magic_methods_011.phpt +++ b/Zend/tests/magic_methods_011.phpt @@ -3,7 +3,7 @@ __set first parameter should be a string when typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_012.phpt b/Zend/tests/magic_methods_012.phpt index 4ac3952c4d872..450c7b229577a 100644 --- a/Zend/tests/magic_methods_012.phpt +++ b/Zend/tests/magic_methods_012.phpt @@ -3,7 +3,7 @@ __get first parameter should be a string when typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_013.phpt b/Zend/tests/magic_methods_013.phpt index 03a4fb7ea7ffd..95614779d5666 100644 --- a/Zend/tests/magic_methods_013.phpt +++ b/Zend/tests/magic_methods_013.phpt @@ -3,7 +3,7 @@ __isset first parameter should be a string when typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_014.phpt b/Zend/tests/magic_methods_014.phpt index 783b6003dc846..8a1aa6388d851 100644 --- a/Zend/tests/magic_methods_014.phpt +++ b/Zend/tests/magic_methods_014.phpt @@ -3,7 +3,7 @@ __unset first parameter should be a string when typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_015.phpt b/Zend/tests/magic_methods_015.phpt index d5e93c9ef074e..3b7cf696182d5 100644 --- a/Zend/tests/magic_methods_015.phpt +++ b/Zend/tests/magic_methods_015.phpt @@ -3,7 +3,7 @@ __call first parameter should be a string typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_016.phpt b/Zend/tests/magic_methods_016.phpt index a0ac45e42aebf..c456afa12783e 100644 --- a/Zend/tests/magic_methods_016.phpt +++ b/Zend/tests/magic_methods_016.phpt @@ -3,7 +3,7 @@ __call second parameter should be an array when typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_017.phpt b/Zend/tests/magic_methods_017.phpt index 9afb089f311c0..0ce622712364b 100644 --- a/Zend/tests/magic_methods_017.phpt +++ b/Zend/tests/magic_methods_017.phpt @@ -3,7 +3,7 @@ __callStatic first parameter should be a string typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_018.phpt b/Zend/tests/magic_methods_018.phpt index faddd3cca11d5..914a8898082c8 100644 --- a/Zend/tests/magic_methods_018.phpt +++ b/Zend/tests/magic_methods_018.phpt @@ -3,7 +3,7 @@ __callStatic second parameter should be an array typed --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_019.phpt b/Zend/tests/magic_methods_019.phpt index 85823e6c40291..f0a5fabff29d7 100644 --- a/Zend/tests/magic_methods_019.phpt +++ b/Zend/tests/magic_methods_019.phpt @@ -3,7 +3,7 @@ __unserialize first parameter must be an array --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_020.phpt b/Zend/tests/magic_methods_020.phpt index 45e144cac793c..4efaf6fb18a82 100644 --- a/Zend/tests/magic_methods_020.phpt +++ b/Zend/tests/magic_methods_020.phpt @@ -4,7 +4,7 @@ __set_state first parameter must be an array diff --git a/Zend/tests/magic_methods_inheritance_rules.phpt b/Zend/tests/magic_methods_inheritance_rules.phpt index e91fdc7848097..6bdcafb1bfb5a 100644 --- a/Zend/tests/magic_methods_inheritance_rules.phpt +++ b/Zend/tests/magic_methods_inheritance_rules.phpt @@ -3,65 +3,65 @@ Magic Methods inheritance rules --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt index 72c20a788532d..2835b46830952 100644 --- a/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt +++ b/Zend/tests/magic_methods_inheritance_rules_non_trivial_02.phpt @@ -3,15 +3,15 @@ Magic Methods inheritance rules on a non-trivial class hierarchy --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_sleep.phpt b/Zend/tests/magic_methods_sleep.phpt index 593d8fc037bf4..89baac4699d13 100644 --- a/Zend/tests/magic_methods_sleep.phpt +++ b/Zend/tests/magic_methods_sleep.phpt @@ -3,7 +3,7 @@ __sleep cannot take arguments --FILE-- --EXPECTF-- diff --git a/Zend/tests/magic_methods_wakeup.phpt b/Zend/tests/magic_methods_wakeup.phpt index f4edb33576bc5..8d72b6be866ad 100644 --- a/Zend/tests/magic_methods_wakeup.phpt +++ b/Zend/tests/magic_methods_wakeup.phpt @@ -3,7 +3,7 @@ __wakeup cannot take arguments --FILE-- --EXPECTF-- diff --git a/Zend/tests/return_types/033.phpt b/Zend/tests/return_types/033.phpt index e725465253fda..1eb5171cb08ef 100644 --- a/Zend/tests/return_types/033.phpt +++ b/Zend/tests/return_types/033.phpt @@ -3,7 +3,7 @@ __set can only declare void return --FILE-- --EXPECTF-- diff --git a/Zend/tests/return_types/034.phpt b/Zend/tests/return_types/034.phpt index 50324208cbc9a..80a57cf1e8cd2 100644 --- a/Zend/tests/return_types/034.phpt +++ b/Zend/tests/return_types/034.phpt @@ -3,7 +3,7 @@ __isset can only declare a boolean return type --FILE-- --EXPECTF-- diff --git a/Zend/tests/return_types/035.phpt b/Zend/tests/return_types/035.phpt index fa2d331f55e6e..359790b82eab8 100644 --- a/Zend/tests/return_types/035.phpt +++ b/Zend/tests/return_types/035.phpt @@ -3,7 +3,7 @@ __unset can only declare void return --FILE-- --EXPECTF-- diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 719e7aaffeff0..f42542c6b2611 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -6936,11 +6936,6 @@ void zend_compile_func_decl(znode *result, zend_ast *ast, zend_bool toplevel) /* zend_oparray_context_begin(&orig_oparray_context); - if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_STMT) { - zend_op *opline_ext = zend_emit_op(NULL, ZEND_EXT_NOP, NULL, NULL); - opline_ext->lineno = decl->start_lineno; - } - { /* Push a separator to the loop variable stack */ zend_loop_var dummy_var; diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 22afd49c2e0c7..e2e5aa83915d7 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -4454,14 +4454,13 @@ ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *cal if (fbc->type == ZEND_USER_FUNCTION) { zend_op_array *op_array = &fbc->op_array; uint32_t num_args = ZEND_CALL_NUM_ARGS(call); - uint32_t opline_offset = op_array->opcodes[0].opcode == ZEND_EXT_NOP; for (uint32_t i = 0; i < num_args; i++) { zval *arg = ZEND_CALL_VAR_NUM(call, i); if (!Z_ISUNDEF_P(arg)) { continue; } - zend_op *opline = &op_array->opcodes[i + opline_offset]; + zend_op *opline = &op_array->opcodes[i]; if (EXPECTED(opline->opcode == ZEND_RECV_INIT)) { zval *default_value = RT_CONSTANT(opline, opline->op2); if (Z_OPT_TYPE_P(default_value) == IS_CONSTANT_AST) { diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 030455a94e3a1..7572a0d8900c6 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -891,9 +891,7 @@ zend_result zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_ uint32_t orig_jit_trace_num = EG(jit_trace_num); zend_init_func_execute_data(call, &func->op_array, fci->retval); - if (ZEND_OBSERVER_ENABLED) { - zend_observer_maybe_fcall_call_begin(call); - } + ZEND_OBSERVER_FCALL_BEGIN(call); zend_execute_ex(call); EG(jit_trace_num) = orig_jit_trace_num; EG(opline_before_exception) = current_opline_before_exception; diff --git a/Zend/zend_generators.c b/Zend/zend_generators.c index baca12f66b56d..177cf5c75d199 100644 --- a/Zend/zend_generators.c +++ b/Zend/zend_generators.c @@ -262,7 +262,7 @@ static void zend_generator_dtor_storage(zend_object *object) /* {{{ */ OBJ_RELEASE(&parent->std); /* Reset for resuming in finally */ generator->node.parent = NULL; - generator->node.ptr.root = generator; + generator->node.ptr.root = generator; } } @@ -859,20 +859,11 @@ ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */ if (!ZEND_OBSERVER_ENABLED) { zend_execute_ex(generator->execute_data); } else { - zend_op_array *op_array = &generator->execute_data->func->op_array; - void *observer_handlers = ZEND_OBSERVER_HANDLERS(op_array); - if (!observer_handlers) { - zend_observer_fcall_install((zend_function *)op_array); - observer_handlers = ZEND_OBSERVER_HANDLERS(op_array); - } - ZEND_ASSERT(observer_handlers); - if (observer_handlers != ZEND_OBSERVER_NOT_OBSERVED) { - zend_observe_fcall_begin(observer_handlers, generator->execute_data); - } + zend_observer_generator_resume(generator->execute_data); zend_execute_ex(generator->execute_data); if (generator->execute_data) { /* On the final return, this will be called from ZEND_GENERATOR_RETURN */ - zend_observer_maybe_fcall_call_end(generator->execute_data, &generator->value); + zend_observer_fcall_end(generator->execute_data, &generator->value); } } generator->flags &= ~ZEND_GENERATOR_CURRENTLY_RUNNING; diff --git a/Zend/zend_observer.c b/Zend/zend_observer.c index b124de5cc3699..5544039c3e87f 100644 --- a/Zend/zend_observer.c +++ b/Zend/zend_observer.c @@ -23,6 +23,21 @@ #include "zend_llist.h" #include "zend_vm.h" +#define ZEND_OBSERVER_DATA(op_array) \ + ZEND_OP_ARRAY_EXTENSION(op_array, zend_observer_fcall_op_array_extension) + +#define ZEND_OBSERVER_NOT_OBSERVED ((void *) 2) + +#define ZEND_OBSERVABLE_FN(fn_flags) \ + (!(fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE | ZEND_ACC_FAKE_CLOSURE))) + +typedef struct _zend_observer_fcall_data { + // points after the last handler + zend_observer_fcall_handlers *end; + // a variadic array using "struct hack" + zend_observer_fcall_handlers handlers[1]; +} zend_observer_fcall_data; + zend_llist zend_observers_fcall_list; zend_llist zend_observer_error_callbacks; @@ -30,12 +45,6 @@ int zend_observer_fcall_op_array_extension = -1; ZEND_TLS zend_arena *fcall_handlers_arena = NULL; -ZEND_API extern inline void zend_observer_maybe_fcall_call_begin( - zend_execute_data *execute_data); -ZEND_API extern inline void zend_observer_maybe_fcall_call_end( - zend_execute_data *execute_data, - zval *return_value); - // Call during minit/startup ONLY ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init init) { /* We don't want to get an extension handle unless an ext installs an observer */ @@ -80,7 +89,7 @@ ZEND_API void zend_observer_shutdown(void) { zend_llist_destroy(&zend_observer_error_callbacks); } -ZEND_API void zend_observer_fcall_install(zend_function *function) { +static void zend_observer_fcall_install(zend_function *function) { zend_llist_element *element; zend_llist *list = &zend_observers_fcall_list; zend_op_array *op_array = &function->op_array; @@ -92,11 +101,11 @@ ZEND_API void zend_observer_fcall_install(zend_function *function) { ZEND_ASSERT(function->type != ZEND_INTERNAL_FUNCTION); zend_llist handlers_list; - zend_llist_init(&handlers_list, sizeof(zend_observer_fcall), NULL, 0); + zend_llist_init(&handlers_list, sizeof(zend_observer_fcall_handlers), NULL, 0); for (element = list->head; element; element = element->next) { zend_observer_fcall_init init; memcpy(&init, element->data, sizeof init); - zend_observer_fcall handlers = init(function); + zend_observer_fcall_handlers handlers = init(function); if (handlers.begin || handlers.end) { zend_llist_add_element(&handlers_list, &handlers); } @@ -105,58 +114,97 @@ ZEND_API void zend_observer_fcall_install(zend_function *function) { ZEND_ASSERT(RUN_TIME_CACHE(op_array)); void *ext; if (handlers_list.count) { - size_t size = sizeof(zend_observer_fcall_cache) + (handlers_list.count - 1) * sizeof(zend_observer_fcall); - zend_observer_fcall_cache *cache = zend_arena_alloc(&fcall_handlers_arena, size); - zend_observer_fcall *handler = cache->handlers; + size_t size = sizeof(zend_observer_fcall_data) + (handlers_list.count - 1) * sizeof(zend_observer_fcall_handlers); + zend_observer_fcall_data *fcall_data = zend_arena_alloc(&fcall_handlers_arena, size); + zend_observer_fcall_handlers *handlers = fcall_data->handlers; for (element = handlers_list.head; element; element = element->next) { - memcpy(handler++, element->data, sizeof *handler); + memcpy(handlers++, element->data, sizeof *handlers); } - cache->end = handler; - ext = cache; + fcall_data->end = handlers; + ext = fcall_data; } else { ext = ZEND_OBSERVER_NOT_OBSERVED; } - ZEND_OBSERVER_HANDLERS(op_array) = ext; + ZEND_OBSERVER_DATA(op_array) = ext; zend_llist_destroy(&handlers_list); } -ZEND_API void zend_observe_fcall_begin( - zend_observer_fcall_cache *cache, - zend_execute_data *execute_data) +static void ZEND_FASTCALL _zend_observe_fcall_begin(zend_execute_data *execute_data) { - zend_observer_fcall *handler, *end = cache->end; - for (handler = cache->handlers; handler != end; ++handler) { - if (handler->begin) { - handler->begin(execute_data); + zend_op_array *op_array; + uint32_t fn_flags; + zend_observer_fcall_data *fcall_data; + zend_observer_fcall_handlers *handlers, *end; + + if (!ZEND_OBSERVER_ENABLED) { + return; + } + + op_array = &execute_data->func->op_array; + fn_flags = op_array->fn_flags; + + if (!ZEND_OBSERVABLE_FN(fn_flags)) { + return; + } + + fcall_data = ZEND_OBSERVER_DATA(op_array); + if (!fcall_data) { + zend_observer_fcall_install((zend_function *)op_array); + fcall_data = ZEND_OBSERVER_DATA(op_array); + } + + ZEND_ASSERT(fcall_data); + if (fcall_data == ZEND_OBSERVER_NOT_OBSERVED) { + return; + } + + end = fcall_data->end; + for (handlers = fcall_data->handlers; handlers != end; ++handlers) { + if (handlers->begin) { + handlers->begin(execute_data); } } } -ZEND_API void zend_observer_fcall_call_end_helper( - zend_execute_data *execute_data, - zval *return_value) +ZEND_API void ZEND_FASTCALL zend_observer_generator_resume(zend_execute_data *execute_data) { - zend_function *func = execute_data->func; - ZEND_ASSUME(ZEND_OBSERVABLE_FN(func->common.fn_flags)); - void *observer_handlers = ZEND_OBSERVER_HANDLERS(&func->op_array); - // TODO: Fix exceptions from generators - // ZEND_ASSERT(observer_handlers); - if (observer_handlers && observer_handlers != ZEND_OBSERVER_NOT_OBSERVED) { - zend_observer_fcall_cache *cache = observer_handlers; - zend_observe_fcall_end(cache, execute_data, return_value); + _zend_observe_fcall_begin(execute_data); +} + +ZEND_API void ZEND_FASTCALL zend_observer_fcall_begin(zend_execute_data *execute_data) +{ + ZEND_ASSUME(execute_data->func); + if (!(execute_data->func->common.fn_flags & ZEND_ACC_GENERATOR)) { + _zend_observe_fcall_begin(execute_data); } } -ZEND_API void zend_observe_fcall_end( - zend_observer_fcall_cache *cache, +ZEND_API void ZEND_FASTCALL zend_observer_fcall_end( zend_execute_data *execute_data, zval *return_value) { - zend_observer_fcall *handler = cache->end, *end = cache->handlers; - while (handler-- != end) { - if (handler->end) { - handler->end(execute_data, return_value); + zend_function *func = execute_data->func; + zend_observer_fcall_data *fcall_data; + zend_observer_fcall_handlers *handlers, *end; + + if (!ZEND_OBSERVER_ENABLED + || !ZEND_OBSERVABLE_FN(func->common.fn_flags)) { + return; + } + + fcall_data = (zend_observer_fcall_data*)ZEND_OBSERVER_DATA(&func->op_array); + // TODO: Fix exceptions from generators + // ZEND_ASSERT(fcall_data); + if (!fcall_data || fcall_data == ZEND_OBSERVER_NOT_OBSERVED) { + return; + } + + handlers = fcall_data->end; + end = fcall_data->handlers; + while (handlers-- != end) { + if (handlers->end) { + handlers->end(execute_data, return_value); } } } diff --git a/Zend/zend_observer.h b/Zend/zend_observer.h index 0603591c53957..246a3a61be379 100644 --- a/Zend/zend_observer.h +++ b/Zend/zend_observer.h @@ -29,87 +29,47 @@ extern ZEND_API int zend_observer_fcall_op_array_extension; #define ZEND_OBSERVER_ENABLED (zend_observer_fcall_op_array_extension != -1) -#define ZEND_OBSERVER_HANDLERS(op_array) \ - ZEND_OP_ARRAY_EXTENSION(op_array, zend_observer_fcall_op_array_extension) - -#define ZEND_OBSERVER_NOT_OBSERVED ((void *) 2) - -#define ZEND_OBSERVABLE_FN(fn_flags) \ - (ZEND_OBSERVER_ENABLED && \ - !(fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE | ZEND_ACC_FAKE_CLOSURE))) - -struct zend_observer_fcall { - void (*begin)(zend_execute_data *execute_data); - void (*end)(zend_execute_data *execute_data, zval *retval); -}; -typedef struct zend_observer_fcall zend_observer_fcall; - -struct zend_observer_fcall_cache { - // points after the last handler - zend_observer_fcall *end; - // a variadic array using "struct hack" - zend_observer_fcall handlers[1]; -}; -typedef struct zend_observer_fcall_cache zend_observer_fcall_cache; +#define ZEND_OBSERVER_FCALL_BEGIN(execute_data) do { \ + if (ZEND_OBSERVER_ENABLED) { \ + zend_observer_fcall_begin(execute_data); \ + } \ + } while (0) + +#define ZEND_OBSERVER_FCALL_END(execute_data, return_value) do { \ + if (ZEND_OBSERVER_ENABLED) { \ + zend_observer_fcall_end(execute_data, return_value); \ + } \ + } while (0) + +typedef void (*zend_observer_fcall_begin_handler)(zend_execute_data *execute_data); +typedef void (*zend_observer_fcall_end_handler)(zend_execute_data *execute_data, zval *retval); + +typedef struct _zend_observer_fcall_handlers { + zend_observer_fcall_begin_handler begin; + zend_observer_fcall_end_handler end; +} zend_observer_fcall_handlers; /* If the fn should not be observed then return {NULL, NULL} */ -typedef zend_observer_fcall(*zend_observer_fcall_init)(zend_function *func); +typedef zend_observer_fcall_handlers (*zend_observer_fcall_init)(zend_function *func); // Call during minit/startup ONLY -ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init init); +ZEND_API void zend_observer_fcall_register(zend_observer_fcall_init); ZEND_API void zend_observer_startup(void); // Called by engine before MINITs ZEND_API void zend_observer_activate(void); ZEND_API void zend_observer_deactivate(void); ZEND_API void zend_observer_shutdown(void); -ZEND_API void zend_observer_fcall_install(zend_function *function); - -ZEND_API void zend_observe_fcall_begin( - zend_observer_fcall_cache *cache, +ZEND_API void ZEND_FASTCALL zend_observer_fcall_begin( zend_execute_data *execute_data); -ZEND_API void zend_observe_fcall_end( - zend_observer_fcall_cache *cache, - zend_execute_data *execute_data, - zval *return_value); +ZEND_API void ZEND_FASTCALL zend_observer_generator_resume( + zend_execute_data *execute_data); -ZEND_API void zend_observer_fcall_call_end_helper( +ZEND_API void ZEND_FASTCALL zend_observer_fcall_end( zend_execute_data *execute_data, zval *return_value); -ZEND_API zend_always_inline void zend_observer_maybe_fcall_call_begin( - zend_execute_data *execute_data) -{ - ZEND_ASSUME(execute_data->func); - zend_op_array *op_array = &execute_data->func->op_array; - uint32_t fn_flags = op_array->fn_flags; - if (ZEND_OBSERVABLE_FN(fn_flags) && !(fn_flags & ZEND_ACC_GENERATOR)) { - void *observer_handlers = ZEND_OBSERVER_HANDLERS(op_array); - if (!observer_handlers) { - zend_observer_fcall_install((zend_function *)op_array); - observer_handlers = ZEND_OBSERVER_HANDLERS(op_array); - } - - ZEND_ASSERT(observer_handlers); - if (observer_handlers != ZEND_OBSERVER_NOT_OBSERVED) { - zend_observe_fcall_begin( - (zend_observer_fcall_cache *)observer_handlers, - execute_data); - } - } -} - -ZEND_API zend_always_inline void zend_observer_maybe_fcall_call_end( - zend_execute_data *execute_data, - zval *return_value) -{ - zend_function *func = execute_data->func; - if (ZEND_OBSERVABLE_FN(func->common.fn_flags)) { - zend_observer_fcall_call_end_helper(execute_data, return_value); - } -} - typedef void (*zend_observer_error_cb)(int type, const char *error_filename, uint32_t error_lineno, zend_string *message); ZEND_API void zend_observer_error_register(zend_observer_error_cb callback); diff --git a/Zend/zend_vm_def.h b/Zend/zend_vm_def.h index 6af78eb3ae178..510595b7c8668 100644 --- a/Zend/zend_vm_def.h +++ b/Zend/zend_vm_def.h @@ -3956,7 +3956,7 @@ ZEND_VM_HOT_HANDLER(130, ZEND_DO_UCALL, ANY, ANY, SPEC(RETVAL,OBSERVER)) call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - OBSERVER_FCALL_BEGIN_HANDLERS(execute_data); + ZEND_OBSERVER_FCALL_BEGIN(execute_data); LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); @@ -3981,14 +3981,14 @@ ZEND_VM_HOT_HANDLER(131, ZEND_DO_FCALL_BY_NAME, ANY, ANY, SPEC(RETVAL,OBSERVER)) call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - OBSERVER_FCALL_BEGIN_HANDLERS(execute_data); + ZEND_OBSERVER_FCALL_BEGIN(execute_data); LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); } else { zval retval; ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION); - if (IS_OBSERVER) { + if (ZEND_OBSERVER_ENABLED) { ret = NULL; } @@ -4075,7 +4075,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER)) call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 1 EXECUTE_DATA_CC); - OBSERVER_FCALL_BEGIN_HANDLERS(execute_data); + ZEND_OBSERVER_FCALL_BEGIN(execute_data); if (EXPECTED(zend_execute_ex == execute_ex)) { LOAD_OPLINE_EX(); @@ -4090,7 +4090,7 @@ ZEND_VM_HOT_HANDLER(60, ZEND_DO_FCALL, ANY, ANY, SPEC(RETVAL,OBSERVER)) } else { zval retval; ZEND_ASSERT(fbc->type == ZEND_INTERNAL_FUNCTION); - if (IS_OBSERVER) { + if (ZEND_OBSERVER_ENABLED) { ret = NULL; } @@ -4296,7 +4296,7 @@ ZEND_VM_INLINE_HANDLER(62, ZEND_RETURN, CONST|TMP|VAR|CV, ANY, SPEC(OBSERVER)) } } } - OBSERVER_FCALL_END_HANDLERS(execute_data, return_value); + ZEND_OBSERVER_FCALL_END(execute_data, return_value); ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper); } @@ -4357,7 +4357,7 @@ ZEND_VM_COLD_CONST_HANDLER(111, ZEND_RETURN_BY_REF, CONST|TMP|VAR|CV, ANY, SRC, FREE_OP1_VAR_PTR(); } while (0); - OBSERVER_FCALL_END_HANDLERS(execute_data, EX(return_value)); + ZEND_OBSERVER_FCALL_END(execute_data, EX(return_value)); ZEND_VM_DISPATCH_TO_HELPER(zend_leave_helper); } @@ -4473,7 +4473,7 @@ ZEND_VM_HANDLER(161, ZEND_GENERATOR_RETURN, CONST|TMP|VAR|CV, ANY, SPEC(OBSERVER } } - OBSERVER_FCALL_END_HANDLERS(generator->execute_data, &generator->retval); + ZEND_OBSERVER_FCALL_END(generator->execute_data, &generator->retval); /* Close the generator to free up resources */ zend_generator_close(generator, 1); @@ -6191,7 +6191,7 @@ ZEND_VM_HANDLER(73, ZEND_INCLUDE_OR_EVAL, CONST|TMPVAR|CV, ANY, EVAL, SPEC(OBSER call->prev_execute_data = execute_data; i_init_code_execute_data(call, new_op_array, return_value); - OBSERVER_FCALL_BEGIN_HANDLERS(call); + ZEND_OBSERVER_FCALL_BEGIN(call); if (EXPECTED(zend_execute_ex == execute_ex)) { FREE_OP1(); ZEND_VM_ENTER(); @@ -7731,7 +7731,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY, SPEC(OBSERVER)) } } - OBSERVER_FCALL_END_HANDLERS(execute_data, EX(return_value)); + ZEND_OBSERVER_FCALL_END(execute_data, EX(return_value)); cleanup_unfinished_calls(execute_data, throw_op_num); if (throw_op->result_type & (IS_VAR | IS_TMP_VAR)) { @@ -8493,7 +8493,7 @@ ZEND_VM_HANDLER(158, ZEND_CALL_TRAMPOLINE, ANY, ANY, SPEC(OBSERVER)) } execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - OBSERVER_FCALL_BEGIN_HANDLERS(execute_data); + ZEND_OBSERVER_FCALL_BEGIN(execute_data); if (EXPECTED(zend_execute_ex == execute_ex)) { LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); diff --git a/Zend/zend_vm_execute.h b/Zend/zend_vm_execute.h index a6feaf02e0caa..f59c923bd1613 100644 --- a/Zend/zend_vm_execute.h +++ b/Zend/zend_vm_execute.h @@ -1398,7 +1398,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_UCALL_SPEC_OBS call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - zend_observer_maybe_fcall_call_begin(execute_data); + zend_observer_fcall_begin(execute_data); LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); @@ -1611,7 +1611,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_BY_NAME_ call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - zend_observer_maybe_fcall_call_begin(execute_data); + zend_observer_fcall_begin(execute_data); LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); @@ -1915,7 +1915,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DO_FCALL_SPEC_OBS call->prev_execute_data = execute_data; execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 1 EXECUTE_DATA_CC); - zend_observer_maybe_fcall_call_begin(execute_data); + zend_observer_fcall_begin(execute_data); if (EXPECTED(zend_execute_ex == execute_ex)) { LOAD_OPLINE_EX(); @@ -2991,7 +2991,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_HANDLE_EXCEPTION_SPEC_OBSERVER } } - zend_observer_maybe_fcall_call_end(execute_data, EX(return_value)); + zend_observer_fcall_end(execute_data, EX(return_value)); cleanup_unfinished_calls(execute_data, throw_op_num); if (throw_op->result_type & (IS_VAR | IS_TMP_VAR)) { @@ -3322,7 +3322,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_CALL_TRAMPOLINE_SPEC_OBSERVER_ } execute_data = call; i_init_func_execute_data(&fbc->op_array, ret, 0 EXECUTE_DATA_CC); - zend_observer_maybe_fcall_call_begin(execute_data); + zend_observer_fcall_begin(execute_data); if (EXPECTED(zend_execute_ex == execute_ex)) { LOAD_OPLINE_EX(); ZEND_VM_ENTER_EX(); @@ -4193,7 +4193,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_SPEC_OBSER } } } - zend_observer_maybe_fcall_call_end(execute_data, return_value); + zend_observer_fcall_end(execute_data, return_value); ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -4313,7 +4313,7 @@ static ZEND_VM_COLD ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_RETURN_BY_REF_SPE if (opline->op1_type == IS_VAR) {zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));}; } while (0); - zend_observer_maybe_fcall_call_end(execute_data, EX(return_value)); + zend_observer_fcall_end(execute_data, EX(return_value)); ZEND_VM_TAIL_CALL(zend_leave_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU)); } @@ -4396,7 +4396,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_GENERATOR_RETURN_SPEC_OBSERVER } } - zend_observer_maybe_fcall_call_end(generator->execute_data, &generator->retval); + zend_observer_fcall_end(generator->execute_data, &generator->retval); /* Close the generator to free up resources */ zend_generator_close(generator, 1); @@ -4800,7 +4800,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_INCLUDE_OR_EVAL_SPEC_OBSERVER_ call->prev_execute_data = execute_data; i_init_code_execute_data(call, new_op_array, return_value); - zend_observer_maybe_fcall_call_begin(call); + zend_observer_fcall_begin(call); if (EXPECTED(zend_execute_ex == execute_ex)) { FREE_OP(opline->op1_type, opline->op1.var); ZEND_VM_ENTER(); @@ -54806,7 +54806,7 @@ ZEND_API void execute_ex(zend_execute_data *ex) } } } - zend_observer_maybe_fcall_call_end(execute_data, return_value); + zend_observer_fcall_end(execute_data, return_value); goto zend_leave_helper_SPEC_LABEL; } @@ -58782,9 +58782,7 @@ ZEND_API void zend_execute(zend_op_array *op_array, zval *return_value) } EX(prev_execute_data) = EG(current_execute_data); i_init_code_execute_data(execute_data, op_array, return_value); - if (ZEND_OBSERVER_ENABLED) { - zend_observer_maybe_fcall_call_begin(execute_data); - } + ZEND_OBSERVER_FCALL_BEGIN(execute_data); zend_execute_ex(execute_data); /* Observer end handlers are called from ZEND_RETURN */ zend_vm_stack_free_call_frame(execute_data); diff --git a/Zend/zend_vm_execute.skl b/Zend/zend_vm_execute.skl index 22911760e43e1..582ec490e2d77 100644 --- a/Zend/zend_vm_execute.skl +++ b/Zend/zend_vm_execute.skl @@ -55,9 +55,7 @@ ZEND_API void zend_{%EXECUTOR_NAME%}(zend_op_array *op_array, zval *return_value } EX(prev_execute_data) = EG(current_execute_data); i_init_code_execute_data(execute_data, op_array, return_value); - if (ZEND_OBSERVER_ENABLED) { - zend_observer_maybe_fcall_call_begin(execute_data); - } + ZEND_OBSERVER_FCALL_BEGIN(execute_data); zend_{%EXECUTOR_NAME%}_ex(execute_data); /* Observer end handlers are called from ZEND_RETURN */ zend_vm_stack_free_call_frame(execute_data); diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index e3dceaa829a1e..3346a59cfa620 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -793,12 +793,12 @@ function gen_code($f, $spec, $kind, $code, $op1, $op2, $name, $extra_spec=null) "/opline->extended_value\s*&\s*~\s*ZEND_ISEMPTY/" => isset($extra_spec['ISSET']) ? ($extra_spec['ISSET'] == 0 ? "\\0" : "opline->extended_value") : "\\0", - "/IS_OBSERVER/" => isset($extra_spec['OBSERVER']) && $extra_spec['OBSERVER'] == 1 ? "1" : "0", - "/OBSERVER_FCALL_BEGIN_HANDLERS\(\s*(.*)\s*\)/" => isset($extra_spec['OBSERVER']) ? - ($extra_spec['OBSERVER'] == 0 ? "" : "zend_observer_maybe_fcall_call_begin(\\1)") + "/ZEND_OBSERVER_ENABLED/" => isset($extra_spec['OBSERVER']) && $extra_spec['OBSERVER'] == 1 ? "1" : "0", + "/ZEND_OBSERVER_FCALL_BEGIN\(\s*(.*)\s*\)/" => isset($extra_spec['OBSERVER']) ? + ($extra_spec['OBSERVER'] == 0 ? "" : "zend_observer_fcall_begin(\\1)") : "", - "/OBSERVER_FCALL_END_HANDLERS\(\s*([^,]*)\s*,\s*(.*)\s*\)/" => isset($extra_spec['OBSERVER']) ? - ($extra_spec['OBSERVER'] == 0 ? "" : "zend_observer_maybe_fcall_call_end(\\1, \\2)") + "/ZEND_OBSERVER_FCALL_END\(\s*([^,]*)\s*,\s*(.*)\s*\)/" => isset($extra_spec['OBSERVER']) ? + ($extra_spec['OBSERVER'] == 0 ? "" : "zend_observer_fcall_end(\\1, \\2)") : "", ); $code = preg_replace(array_keys($specialized_replacements), array_values($specialized_replacements), $code); diff --git a/azure/apt.yml b/azure/apt.yml index bd3ba3308e01b..71f58ce8da2ad 100644 --- a/azure/apt.yml +++ b/azure/apt.yml @@ -42,5 +42,6 @@ steps: snmp-mibs-downloader \ unixodbc-dev \ llvm \ + libc-client-dev libkrb5-dev dovecot-core dovecot-pop3d dovecot-imapd \ ${{ parameters.packages }} displayName: 'APT' diff --git a/azure/configure.yml b/azure/configure.yml index dc7f754eae425..0bfbf6d92e0ec 100644 --- a/azure/configure.yml +++ b/azure/configure.yml @@ -58,6 +58,9 @@ steps: --enable-dba \ --with-snmp \ --with-unixODBC \ + --with-imap \ + --with-kerberos \ + --with-imap-ssl \ --enable-werror \ --with-config-file-path=/etc \ --with-config-file-scan-dir=/etc/php.d diff --git a/azure/setup.yml b/azure/setup.yml index 825ca4d5f6c01..e0b4dc79da991 100644 --- a/azure/setup.yml +++ b/azure/setup.yml @@ -16,4 +16,12 @@ steps: sudo cp ext/snmp/tests/bigtest /etc/snmp sudo service snmpd restart displayName: 'Configure snmpd' + - script: | + set -e + sudo groupadd -g 5000 vmail + sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail + sudo cp ext/imap/tests/dovecot.conf /etc/dovecot/dovecot.conf + sudo cp ext/imap/tests/dovecotpass /etc/dovecot/dovecotpass + sudo service dovecot restart + displayName: 'Configure IMAP' diff --git a/ext/com_dotnet/tests/bug66431_0.phpt b/ext/com_dotnet/tests/bug66431_0.phpt index 4a0062a7e13c2..5f9bc5c0b0bb5 100644 --- a/ext/com_dotnet/tests/bug66431_0.phpt +++ b/ext/com_dotnet/tests/bug66431_0.phpt @@ -33,7 +33,7 @@ if (!$result) { $fpath = str_replace("/", "\\", __DIR__ . "/bug66431.txt"); if (file_exists($fpath)) { - unlink($fpath); + unlink($fpath); } ?> --EXPECT-- diff --git a/ext/com_dotnet/tests/bug66431_1.phpt b/ext/com_dotnet/tests/bug66431_1.phpt index e99131d27b1e1..7ebf16a10d1da 100644 --- a/ext/com_dotnet/tests/bug66431_1.phpt +++ b/ext/com_dotnet/tests/bug66431_1.phpt @@ -5,9 +5,9 @@ Bug #66431 Special Character via COM Interface (CP_UTF8), Application.Word if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; } try { - new COM("word.application", NULL, CP_UTF8); + new COM("word.application", NULL, CP_UTF8); } catch (Exception $e) { - die('skip ' . $e->getMessage()); + die('skip ' . $e->getMessage()); } ?> @@ -51,7 +51,7 @@ if (!$result) { $fpath = str_replace("/", "\\", __DIR__ . "/bug66431.docx"); if (file_exists($fpath)) { - unlink($fpath); + unlink($fpath); } ?> --EXPECT-- diff --git a/ext/com_dotnet/tests/variants_x64.phpt b/ext/com_dotnet/tests/variants_x64.phpt index 88f9f3e12616e..6a1b7e1c12925 100644 --- a/ext/com_dotnet/tests/variants_x64.phpt +++ b/ext/com_dotnet/tests/variants_x64.phpt @@ -5,7 +5,7 @@ COM: General variant tests if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; if (8 != PHP_INT_SIZE) print "skip x64 only"; if ((string) variant_cat(new VARIANT(false), new VARIANT(0.5)) != 'False0.5') - print "skip English locale only"; + print "skip English locale only"; ?> --FILE-- --FILE-- diff --git a/ext/curl/tests/bug48514.phpt b/ext/curl/tests/bug48514.phpt index 759e4bc1be163..12dcdd498b0c0 100644 --- a/ext/curl/tests/bug48514.phpt +++ b/ext/curl/tests/bug48514.phpt @@ -4,7 +4,7 @@ Bug #48514 (cURL extension uses same resource name for simple and multi APIs) diff --git a/ext/curl/tests/bug52827.phpt b/ext/curl/tests/bug52827.phpt index 8fbcad627d4ef..3b9aabf92cdc1 100644 --- a/ext/curl/tests/bug52827.phpt +++ b/ext/curl/tests/bug52827.phpt @@ -4,7 +4,7 @@ Bug #52827 (curl_setopt with CURLOPT_STDERR erroneously increments the resource diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt index 316fa4d0e7315..9b795241f26b2 100644 --- a/ext/curl/tests/bug61948.phpt +++ b/ext/curl/tests/bug61948.phpt @@ -18,9 +18,9 @@ Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction) ?> --CLEAN-- --EXPECTF-- %a diff --git a/ext/curl/tests/bug71523.phpt b/ext/curl/tests/bug71523.phpt index 2d947febecb7b..3252f75f4613b 100644 --- a/ext/curl/tests/bug71523.phpt +++ b/ext/curl/tests/bug71523.phpt @@ -3,7 +3,7 @@ Bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_ --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/bug72202.phpt b/ext/curl/tests/bug72202.phpt index bf04d9faea501..5b2ebfa2cccc4 100644 --- a/ext/curl/tests/bug72202.phpt +++ b/ext/curl/tests/bug72202.phpt @@ -3,7 +3,7 @@ Bug #72202 (curl_close doesn't close cURL handle) --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/bug76675.phpt b/ext/curl/tests/bug76675.phpt index e59aabc7c3407..5d36abfdd671b 100644 --- a/ext/curl/tests/bug76675.phpt +++ b/ext/curl/tests/bug76675.phpt @@ -4,11 +4,11 @@ Bug #76675 (Segfault with H2 server push write/writeheader handlers) --FILE-- diff --git a/ext/curl/tests/bug77535.phpt b/ext/curl/tests/bug77535.phpt index 95eec344a894e..b1d8f4d4da51a 100644 --- a/ext/curl/tests/bug77535.phpt +++ b/ext/curl/tests/bug77535.phpt @@ -4,11 +4,11 @@ Bug #77535 (Invalid callback, h2 server push) --FILE-- diff --git a/ext/curl/tests/bug77946.phpt b/ext/curl/tests/bug77946.phpt index c983a7761747f..2a0dcd62a3802 100644 --- a/ext/curl/tests/bug77946.phpt +++ b/ext/curl/tests/bug77946.phpt @@ -4,7 +4,7 @@ Bug #77946 (Errored cURL resources returned by curl_multi_info_read() must be co diff --git a/ext/curl/tests/bug79741.phpt b/ext/curl/tests/bug79741.phpt index 3f5a4801b19c2..5fddd30c2769c 100644 --- a/ext/curl/tests/bug79741.phpt +++ b/ext/curl/tests/bug79741.phpt @@ -4,7 +4,7 @@ Bug #79741: curl_setopt CURLOPT_POSTFIELDS asserts on object with declared prope --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- = 7.50.0"); + exit("skip: test works only with curl >= 7.50.0"); } ?> --FILE-- diff --git a/ext/curl/tests/curl_basic_024.phpt b/ext/curl/tests/curl_basic_024.phpt index 6875d4f02a25d..4037a0bc12636 100644 --- a/ext/curl/tests/curl_basic_024.phpt +++ b/ext/curl/tests/curl_basic_024.phpt @@ -4,7 +4,7 @@ Test curl_getinfo() function with CURLINFO_* from curl >= 7.52.0 = 7.52.0"); + exit("skip: test works only with curl >= 7.52.0"); } ?> --FILE-- diff --git a/ext/curl/tests/curl_copy_handle_basic.phpt b/ext/curl/tests/curl_copy_handle_basic.phpt index 0aa58dbcf869e..945768436c5fe 100644 --- a/ext/curl/tests/curl_copy_handle_basic.phpt +++ b/ext/curl/tests/curl_copy_handle_basic.phpt @@ -5,7 +5,7 @@ Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 --SKIPIF-- --FILE-- --FILE-- --DESCRIPTION-- the only way to test if a option is setten on a curl handle is using the curl_getinfo() function. diff --git a/ext/curl/tests/curl_escape.phpt b/ext/curl/tests/curl_escape.phpt index 015b010a1ca2c..91dff3f056339 100644 Binary files a/ext/curl/tests/curl_escape.phpt and b/ext/curl/tests/curl_escape.phpt differ diff --git a/ext/curl/tests/curl_file_serialize.phpt b/ext/curl/tests/curl_file_serialize.phpt index 7748272b7610d..7776a455a402f 100644 --- a/ext/curl/tests/curl_file_serialize.phpt +++ b/ext/curl/tests/curl_file_serialize.phpt @@ -3,7 +3,7 @@ CURL file uploading --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_multi_errno_strerror_001.phpt b/ext/curl/tests/curl_multi_errno_strerror_001.phpt index cc8e175460a51..d0c237ef0c72e 100644 --- a/ext/curl/tests/curl_multi_errno_strerror_001.phpt +++ b/ext/curl/tests/curl_multi_errno_strerror_001.phpt @@ -3,7 +3,7 @@ curl_multi_errno and curl_multi_strerror basic test --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_multi_setopt_basic001.phpt b/ext/curl/tests/curl_multi_setopt_basic001.phpt index 25c3b4962f5c6..7620c421e4cdd 100644 --- a/ext/curl/tests/curl_multi_setopt_basic001.phpt +++ b/ext/curl/tests/curl_multi_setopt_basic001.phpt @@ -3,7 +3,7 @@ curl_multi_setopt basic test --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_multi_strerror_001.phpt b/ext/curl/tests/curl_multi_strerror_001.phpt index 3c2edb988de6b..7d1b426a258a4 100644 --- a/ext/curl/tests/curl_multi_strerror_001.phpt +++ b/ext/curl/tests/curl_multi_strerror_001.phpt @@ -3,7 +3,7 @@ curl_multi_strerror basic test --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_share_errno_strerror_001.phpt b/ext/curl/tests/curl_share_errno_strerror_001.phpt index 3a24121b57ee3..d8f18eb76fd9c 100644 --- a/ext/curl/tests/curl_share_errno_strerror_001.phpt +++ b/ext/curl/tests/curl_share_errno_strerror_001.phpt @@ -3,7 +3,7 @@ curl_share_errno and curl_share_strerror basic test --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_share_setopt_basic001.phpt b/ext/curl/tests/curl_share_setopt_basic001.phpt index d53ae4ff8e963..476ea688250b4 100644 --- a/ext/curl/tests/curl_share_setopt_basic001.phpt +++ b/ext/curl/tests/curl_share_setopt_basic001.phpt @@ -3,7 +3,7 @@ curl_share_setopt basic test --SKIPIF-- --FILE-- diff --git a/ext/curl/tests/curl_strerror_001.phpt b/ext/curl/tests/curl_strerror_001.phpt index 06342598962d9..85a13271c190a 100644 --- a/ext/curl/tests/curl_strerror_001.phpt +++ b/ext/curl/tests/curl_strerror_001.phpt @@ -3,7 +3,7 @@ curl_strerror basic test --SKIPIF-- --FILE-- diff --git a/ext/date/tests/002.phpt b/ext/date/tests/002.phpt index 36dc43d7605b6..65e8228149338 100644 --- a/ext/date/tests/002.phpt +++ b/ext/date/tests/002.phpt @@ -3,7 +3,7 @@ strtotime() function --SKIPIF-- --FILE-- diff --git a/ext/date/tests/bug13142.phpt b/ext/date/tests/bug13142.phpt index 80d4fa82fc453..63eba795d866e 100644 --- a/ext/date/tests/bug13142.phpt +++ b/ext/date/tests/bug13142.phpt @@ -5,10 +5,10 @@ date.timezone=US/Eastern --SKIPIF-- --FILE-- diff --git a/ext/date/tests/bug26317.phpt b/ext/date/tests/bug26317.phpt index 38c724ed57017..bfd416fc5e308 100644 --- a/ext/date/tests/bug26317.phpt +++ b/ext/date/tests/bug26317.phpt @@ -5,7 +5,7 @@ date.timezone=GMT0 --SKIPIF-- --FILE-- diff --git a/ext/date/tests/bug26320.phpt b/ext/date/tests/bug26320.phpt index 563e39ab30601..b8d4fc1d2a3e2 100644 --- a/ext/date/tests/bug26320.phpt +++ b/ext/date/tests/bug26320.phpt @@ -5,7 +5,7 @@ date.timezone=GMT0 --SKIPIF-- --FILE-- diff --git a/ext/date/tests/date_default_timezone_get-1.phpt b/ext/date/tests/date_default_timezone_get-1.phpt index 32c066c1ca7ca..fc466d411d1ec 100644 --- a/ext/date/tests/date_default_timezone_get-1.phpt +++ b/ext/date/tests/date_default_timezone_get-1.phpt @@ -2,7 +2,7 @@ date_default_timezone_get() function [1] --SKIPIF-- --INI-- date.timezone= diff --git a/ext/date/tests/date_default_timezone_get-2.phpt b/ext/date/tests/date_default_timezone_get-2.phpt index cf7478c90b502..44d94cd76f2a3 100644 --- a/ext/date/tests/date_default_timezone_get-2.phpt +++ b/ext/date/tests/date_default_timezone_get-2.phpt @@ -2,7 +2,7 @@ date_default_timezone_get() function [2] --SKIPIF-- --INI-- date.timezone= diff --git a/ext/date/tests/strftime_variation22.phpt b/ext/date/tests/strftime_variation22.phpt index b1c107ba78c08..ab0089e7f75b1 100644 --- a/ext/date/tests/strftime_variation22.phpt +++ b/ext/date/tests/strftime_variation22.phpt @@ -6,7 +6,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { die("skip Test is not valid for Windows"); } if(!setlocale(LC_ALL, "POSIX")) { - die("skip Locale POSIX is needed by test and is not available"); + die("skip Locale POSIX is needed by test and is not available"); } ?> --FILE-- diff --git a/ext/dba/tests/bug36436.phpt b/ext/dba/tests/bug36436.phpt index fe625b62bc6b4..a7a87c70c3474 100644 --- a/ext/dba/tests/bug36436.phpt +++ b/ext/dba/tests/bug36436.phpt @@ -2,8 +2,8 @@ Bug #36436 (DBA problem with Berkeley DB4) --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- resource(%d) of type (dba persistent) diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt index fe4c68aa80fea..364d54d00496a 100644 --- a/ext/dba/tests/bug38698.phpt +++ b/ext/dba/tests/bug38698.phpt @@ -2,8 +2,8 @@ Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- bool(false) diff --git a/ext/dba/tests/bug49125.phpt b/ext/dba/tests/bug49125.phpt index 70f59c97c91a2..7e46ea9f1f04c 100644 --- a/ext/dba/tests/bug49125.phpt +++ b/ext/dba/tests/bug49125.phpt @@ -2,8 +2,8 @@ Bug #49125 (Error in dba_exists C code) --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/dba/tests/bug65708.phpt b/ext/dba/tests/bug65708.phpt index 8bec60a543fc2..dff291a39d263 100644 --- a/ext/dba/tests/bug65708.phpt +++ b/ext/dba/tests/bug65708.phpt @@ -2,7 +2,7 @@ Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write) --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- integer diff --git a/ext/dba/tests/bug72157.phpt b/ext/dba/tests/bug72157.phpt index 71fa8730b89ac..490e9116d153e 100644 --- a/ext/dba/tests/bug72157.phpt +++ b/ext/dba/tests/bug72157.phpt @@ -2,7 +2,7 @@ Bug #72157 (use-after-free caused by dba_open) --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba002.phpt b/ext/dba/tests/dba002.phpt index c0432c4599bc2..2aba823af25c6 100644 --- a/ext/dba/tests/dba002.phpt +++ b/ext/dba/tests/dba002.phpt @@ -2,8 +2,8 @@ DBA Insert/Fetch Test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba003.phpt b/ext/dba/tests/dba003.phpt index 55d4ce9fe010a..dd08f86ed571f 100644 --- a/ext/dba/tests/dba003.phpt +++ b/ext/dba/tests/dba003.phpt @@ -2,8 +2,8 @@ DBA Insert/Replace/Fetch Test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba004.phpt b/ext/dba/tests/dba004.phpt index 3846ccfd2918e..eebbc04ffb9ec 100644 --- a/ext/dba/tests/dba004.phpt +++ b/ext/dba/tests/dba004.phpt @@ -2,8 +2,8 @@ DBA Multiple Insert/Fetch Test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba005.phpt b/ext/dba/tests/dba005.phpt index 0f5767988dd95..bde23a495defa 100644 --- a/ext/dba/tests/dba005.phpt +++ b/ext/dba/tests/dba005.phpt @@ -2,8 +2,8 @@ DBA FirstKey/NextKey Loop Test With 5 Items --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba006.phpt b/ext/dba/tests/dba006.phpt index 1264ccf89955e..dfe93f874db81 100644 --- a/ext/dba/tests/dba006.phpt +++ b/ext/dba/tests/dba006.phpt @@ -2,8 +2,8 @@ DBA FirstKey/NextKey with 2 deletes --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba007.phpt b/ext/dba/tests/dba007.phpt index bb71ad273e40e..b617c34e9b6d6 100644 --- a/ext/dba/tests/dba007.phpt +++ b/ext/dba/tests/dba007.phpt @@ -2,9 +2,9 @@ DBA Multiple File Creation Test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba009.phpt b/ext/dba/tests/dba009.phpt index 4ca9b0ed96ce4..3f23c9748c2e3 100644 --- a/ext/dba/tests/dba009.phpt +++ b/ext/dba/tests/dba009.phpt @@ -2,8 +2,8 @@ DBA dba_popen Test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba010.phpt b/ext/dba/tests/dba010.phpt index f5cb08871a936..1b0d6172aa3c6 100644 --- a/ext/dba/tests/dba010.phpt +++ b/ext/dba/tests/dba010.phpt @@ -2,8 +2,8 @@ DBA with array keys --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba015.phpt b/ext/dba/tests/dba015.phpt index 42a448dde99d5..1da13070492b4 100644 --- a/ext/dba/tests/dba015.phpt +++ b/ext/dba/tests/dba015.phpt @@ -50,7 +50,7 @@ echo dba_fetch("key2", $db_file1), "\n"; ?> --CLEAN-- --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba016.phpt b/ext/dba/tests/dba016.phpt index 5d2a35990cdfb..e670ec86b96b1 100644 --- a/ext/dba/tests/dba016.phpt +++ b/ext/dba/tests/dba016.phpt @@ -17,7 +17,7 @@ $db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); ?> --CLEAN-- --EXPECTF-- database handler: flatfile diff --git a/ext/dba/tests/dba_cdb.phpt b/ext/dba/tests/dba_cdb.phpt index 956483f5f35f3..7ed9a6487b9a9 100644 --- a/ext/dba/tests/dba_cdb.phpt +++ b/ext/dba/tests/dba_cdb.phpt @@ -2,9 +2,9 @@ DBA CDB handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- database handler: cdb diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt index 21969db0743a8..c15f49a805418 100644 --- a/ext/dba/tests/dba_cdb_make.phpt +++ b/ext/dba/tests/dba_cdb_make.phpt @@ -2,9 +2,9 @@ DBA CDB_MAKE handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- database handler: cdb_make diff --git a/ext/dba/tests/dba_cdb_read.phpt b/ext/dba/tests/dba_cdb_read.phpt index 39fc85e454cac..77afb95661d9a 100644 --- a/ext/dba/tests/dba_cdb_read.phpt +++ b/ext/dba/tests/dba_cdb_read.phpt @@ -2,8 +2,8 @@ DBA CDB handler test (read only) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --CLEAN-- --XFAIL-- Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278 diff --git a/ext/dba/tests/dba_dbm.phpt b/ext/dba/tests/dba_dbm.phpt index 47bbae28c0757..6fc649d29c445 100644 --- a/ext/dba/tests/dba_dbm.phpt +++ b/ext/dba/tests/dba_dbm.phpt @@ -2,8 +2,8 @@ DBA DBM handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- database handler: dbm diff --git a/ext/dba/tests/dba_flatfile.phpt b/ext/dba/tests/dba_flatfile.phpt index 41bd0f891d307..c2022895ab70d 100644 --- a/ext/dba/tests/dba_flatfile.phpt +++ b/ext/dba/tests/dba_flatfile.phpt @@ -2,8 +2,8 @@ DBA FlatFile handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- database handler: flatfile diff --git a/ext/dba/tests/dba_gdbm.phpt b/ext/dba/tests/dba_gdbm.phpt index ae4216d7fd5c3..f8174dde58ee7 100644 --- a/ext/dba/tests/dba_gdbm.phpt +++ b/ext/dba/tests/dba_gdbm.phpt @@ -2,8 +2,8 @@ DBA GDBM handler test --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- database handler: inifile diff --git a/ext/dba/tests/dba_lmdb.phpt b/ext/dba/tests/dba_lmdb.phpt index a97244bf36918..b23a2686f8751 100644 --- a/ext/dba/tests/dba_lmdb.phpt +++ b/ext/dba/tests/dba_lmdb.phpt @@ -2,8 +2,8 @@ DBA LMDB handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: lmdb diff --git a/ext/dba/tests/dba_ndbm.phpt b/ext/dba/tests/dba_ndbm.phpt index 74f316e1908e3..0cd00bbab191e 100644 --- a/ext/dba/tests/dba_ndbm.phpt +++ b/ext/dba/tests/dba_ndbm.phpt @@ -2,8 +2,8 @@ DBA NDBM handler test --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- database handler: flatfile diff --git a/ext/dba/tests/dba_qdbm.phpt b/ext/dba/tests/dba_qdbm.phpt index efe34653b3f55..940b929bdf284 100644 --- a/ext/dba/tests/dba_qdbm.phpt +++ b/ext/dba/tests/dba_qdbm.phpt @@ -2,8 +2,8 @@ DBA QDBM handler test --SKIPIF-- --FILE-- --CLEAN-- --EXPECTF-- database handler: qdbm diff --git a/ext/dba/tests/dba_split.phpt b/ext/dba/tests/dba_split.phpt index a85798474182b..246018715033b 100644 --- a/ext/dba/tests/dba_split.phpt +++ b/ext/dba/tests/dba_split.phpt @@ -2,8 +2,8 @@ DBA Split Test --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- database handler: flatfile diff --git a/ext/dba/tests/dba_tcadb.phpt b/ext/dba/tests/dba_tcadb.phpt index 0d7c32f06c6ac..f8ff71cb9eadc 100644 --- a/ext/dba/tests/dba_tcadb.phpt +++ b/ext/dba/tests/dba_tcadb.phpt @@ -2,8 +2,8 @@ DBA TCADB handler test --SKIPIF-- --FILE-- save($temp_filename) . ' bytes'; // Wrote: 72 bytes ?> --CLEAN-- --EXPECT-- Wrote: 72 bytes diff --git a/ext/enchant/tests/broker_describe.phpt b/ext/enchant/tests/broker_describe.phpt index 07134ae50fa2b..93ec1fafdc820 100644 --- a/ext/enchant/tests/broker_describe.phpt +++ b/ext/enchant/tests/broker_describe.phpt @@ -5,21 +5,21 @@ marcosptf - --SKIPIF-- --SKIPIF-- = 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; diff --git a/ext/exif/tests/exif003.phpt b/ext/exif/tests/exif003.phpt index 9d66e35ddc56a..6c043af4e2fdb 100644 --- a/ext/exif/tests/exif003.phpt +++ b/ext/exif/tests/exif003.phpt @@ -2,9 +2,9 @@ Check for exif_read_data, Unicode user comment --SKIPIF-- --INI-- output_handler= diff --git a/ext/exif/tests/exif004.phpt b/ext/exif/tests/exif004.phpt index 2b2e978d528df..1b371ff81f886 100644 --- a/ext/exif/tests/exif004.phpt +++ b/ext/exif/tests/exif004.phpt @@ -2,9 +2,9 @@ Check for exif_read_data, Unicode WinXP tags --SKIPIF-- --INI-- output_handler= diff --git a/ext/ffi/tests/100.phpt b/ext/ffi/tests/100.phpt index 634d8d44362a7..62cd0b2bdb602 100644 --- a/ext/ffi/tests/100.phpt +++ b/ext/ffi/tests/100.phpt @@ -5,9 +5,9 @@ FFI 100: PHP symbols --INI-- diff --git a/ext/ffi/tests/101.phpt b/ext/ffi/tests/101.phpt index 3acc98f035a59..d3a81cbfd1bdc 100644 --- a/ext/ffi/tests/101.phpt +++ b/ext/ffi/tests/101.phpt @@ -5,9 +5,9 @@ FFI 101: PHP symbols (function address) --INI-- diff --git a/ext/ffi/tests/200.phpt b/ext/ffi/tests/200.phpt index 39dcbdf71a6b7..0fba3d4e16175 100644 --- a/ext/ffi/tests/200.phpt +++ b/ext/ffi/tests/200.phpt @@ -5,9 +5,9 @@ FFI 200: PHP callbacks --INI-- diff --git a/ext/ffi/tests/bug77632.phpt b/ext/ffi/tests/bug77632.phpt index 314424548a0fa..df9078b723486 100644 --- a/ext/ffi/tests/bug77632.phpt +++ b/ext/ffi/tests/bug77632.phpt @@ -4,9 +4,9 @@ Bug #77632 (FFI Segfaults When Called With Variadics) --INI-- diff --git a/ext/ffi/tests/bug77632b.phpt b/ext/ffi/tests/bug77632b.phpt index 2509aa9bae8c8..c0fee9ed4f531 100644 --- a/ext/ffi/tests/bug77632b.phpt +++ b/ext/ffi/tests/bug77632b.phpt @@ -5,9 +5,9 @@ Bug #77632 (FFI function pointers with variadics) 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-- diff --git a/ext/ffi/tests/bug77706.phpt b/ext/ffi/tests/bug77706.phpt index 87ef584d51284..5a44d5855371b 100644 --- a/ext/ffi/tests/bug77706.phpt +++ b/ext/ffi/tests/bug77706.phpt @@ -4,9 +4,9 @@ Bug #77632 (FFI Segfaults When Called With Variadics) --INI-- diff --git a/ext/ffi/tests/bug77768.phpt b/ext/ffi/tests/bug77768.phpt index 6c29db59d7cef..204a6e4f8cdb9 100644 --- a/ext/ffi/tests/bug77768.phpt +++ b/ext/ffi/tests/bug77768.phpt @@ -4,9 +4,9 @@ Bug #77768 (Redeclaration of builtin types and repeated declarations) --INI-- diff --git a/ext/fileinfo/tests/bug57547.phpt b/ext/fileinfo/tests/bug57547.phpt index 184ea6e018627..a2375005017fe 100644 --- a/ext/fileinfo/tests/bug57547.phpt +++ b/ext/fileinfo/tests/bug57547.phpt @@ -3,7 +3,7 @@ Bug #57547 Settings options on file doesn't give same result as constructor opti --SKIPIF-- --FILE-- file($f)); +++DONE+++ --CLEAN-- --EXPECT-- string(15) "video/quicktime" diff --git a/ext/fileinfo/tests/bug68731.phpt b/ext/fileinfo/tests/bug68731.phpt index c15b83c951f17..5ae63ee11f775 100644 --- a/ext/fileinfo/tests/bug68731.phpt +++ b/ext/fileinfo/tests/bug68731.phpt @@ -3,7 +3,7 @@ Bug #68731 finfo_buffer doesn't extract the correct mime with some gifs --SKIPIF-- --CLEAN-- --EXPECT-- string(10) "text/plain" diff --git a/ext/fileinfo/tests/bug71527-mb.phpt b/ext/fileinfo/tests/bug71527-mb.phpt index 272cdba702fb4..ea32a8122a923 100644 --- a/ext/fileinfo/tests/bug71527-mb.phpt +++ b/ext/fileinfo/tests/bug71527-mb.phpt @@ -3,7 +3,7 @@ Bug #71527 Buffer over-write in finfo_open with malformed magic file --SKIPIF-- --FILE-- --FILE-- --INI-- pcre.jit=0 diff --git a/ext/fileinfo/tests/cve-2014-3538.phpt b/ext/fileinfo/tests/cve-2014-3538.phpt index 0ff2a68685b7e..4d571b1b3f8b7 100644 --- a/ext/fileinfo/tests/cve-2014-3538.phpt +++ b/ext/fileinfo/tests/cve-2014-3538.phpt @@ -3,9 +3,9 @@ Bug #66731: file: extensive backtracking --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- 45) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/gd/tests/bug43073.phpt b/ext/gd/tests/bug43073.phpt index 74641496de970..4257f6c1a7d8f 100644 --- a/ext/gd/tests/bug43073.phpt +++ b/ext/gd/tests/bug43073.phpt @@ -2,8 +2,8 @@ Bug #43073 (TrueType bounding box is wrong for angle<>0) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/gd/tests/bug44849.phpt b/ext/gd/tests/bug44849.phpt index 22e8a65ec45bc..4710f218f9b21 100644 --- a/ext/gd/tests/bug44849.phpt +++ b/ext/gd/tests/bug44849.phpt @@ -2,7 +2,7 @@ Bug #44849 (imagecolorclosesthwb is not available on Windows) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/gd/tests/bug66356.phpt b/ext/gd/tests/bug66356.phpt index a255997ca08aa..0803ed48bdfdd 100644 --- a/ext/gd/tests/bug66356.phpt +++ b/ext/gd/tests/bug66356.phpt @@ -2,7 +2,7 @@ Bug #66356 (Heap Overflow Vulnerability in imagecrop()) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/gd/tests/bug72512.phpt b/ext/gd/tests/bug72512.phpt index e9331ec600639..96b6de10237d7 100644 --- a/ext/gd/tests/bug72512.phpt +++ b/ext/gd/tests/bug72512.phpt @@ -2,10 +2,10 @@ Bug #19366 (gdimagefill() function crashes (fixed in bundled libgd)) --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- gd1/gd2 conversion test --SKIPIF-- --FILE-- jpeg conversion test --SKIPIF-- --FILE-- png conversion test --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- diff --git a/ext/gd/tests/imagecolourstotal_basic.phpt b/ext/gd/tests/imagecolourstotal_basic.phpt index 955dee9848fdd..0d03ecf7586f6 100644 --- a/ext/gd/tests/imagecolourstotal_basic.phpt +++ b/ext/gd/tests/imagecolourstotal_basic.phpt @@ -4,12 +4,12 @@ Test imagecolorstotal() function : basic functionality Felix De Vliegher --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- Simple test of imagecopyresampled() function diff --git a/ext/gd/tests/imagecreate_error.phpt b/ext/gd/tests/imagecreate_error.phpt index b0b6c3abf7e94..3e16c1f034193 100644 --- a/ext/gd/tests/imagecreate_error.phpt +++ b/ext/gd/tests/imagecreate_error.phpt @@ -2,8 +2,8 @@ Testing imagecreate(): error on out of bound parameters --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECT-- Simple test of imagedashedline() function diff --git a/ext/gd/tests/imagefill_1.phpt b/ext/gd/tests/imagefill_1.phpt index f356fe826df43..ea2129b52b0ef 100644 --- a/ext/gd/tests/imagefill_1.phpt +++ b/ext/gd/tests/imagefill_1.phpt @@ -2,12 +2,12 @@ imagefill() infinite loop with wrong color index --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/gd/tests/imagefilledarc_variation1.phpt b/ext/gd/tests/imagefilledarc_variation1.phpt index cc6e01b4ad495..f17651afef249 100644 --- a/ext/gd/tests/imagefilledarc_variation1.phpt +++ b/ext/gd/tests/imagefilledarc_variation1.phpt @@ -7,7 +7,7 @@ Edgar Ferreira da Silva --FILE-- diff --git a/ext/gd/tests/imagefilledarc_variation2.phpt b/ext/gd/tests/imagefilledarc_variation2.phpt index feb81a8e0628c..b388882390983 100644 --- a/ext/gd/tests/imagefilledarc_variation2.phpt +++ b/ext/gd/tests/imagefilledarc_variation2.phpt @@ -7,7 +7,7 @@ Edgar Ferreira da Silva --FILE-- diff --git a/ext/gd/tests/imagefilledpolygon_basic.phpt b/ext/gd/tests/imagefilledpolygon_basic.phpt index 165e685052d47..6462f42de736e 100644 --- a/ext/gd/tests/imagefilledpolygon_basic.phpt +++ b/ext/gd/tests/imagefilledpolygon_basic.phpt @@ -2,7 +2,7 @@ imagefilledpolygon() --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- Simple test of imagefilledpolygon() function diff --git a/ext/gd/tests/imagefilter.phpt b/ext/gd/tests/imagefilter.phpt index f040c5cac4490..a55b88ee90384 100644 --- a/ext/gd/tests/imagefilter.phpt +++ b/ext/gd/tests/imagefilter.phpt @@ -2,10 +2,10 @@ imagefilter() function test --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/gd/tests/imagelayereffect_basic.phpt b/ext/gd/tests/imagelayereffect_basic.phpt index 5a9c380758218..dc41148394b00 100644 --- a/ext/gd/tests/imagelayereffect_basic.phpt +++ b/ext/gd/tests/imagelayereffect_basic.phpt @@ -5,8 +5,8 @@ Rafael Dohms #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest #tek11 --SKIPIF-- --FILE-- --FILE-- --FILE-- diff --git a/ext/gd/tests/imagepolygon_basic.phpt b/ext/gd/tests/imagepolygon_basic.phpt index d4948fcc61016..bea4462c6a160 100644 --- a/ext/gd/tests/imagepolygon_basic.phpt +++ b/ext/gd/tests/imagepolygon_basic.phpt @@ -2,7 +2,7 @@ imagepolygon() --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- Simple test of imagepolygon() function diff --git a/ext/gd/tests/imagerotate_overflow.phpt b/ext/gd/tests/imagerotate_overflow.phpt index ade61d8f801ce..34d66862ea5bf 100644 --- a/ext/gd/tests/imagerotate_overflow.phpt +++ b/ext/gd/tests/imagerotate_overflow.phpt @@ -2,13 +2,13 @@ imagerotate() overflow with negative numbers --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- diff --git a/ext/gd/tests/imagesetthickness_basic.phpt b/ext/gd/tests/imagesetthickness_basic.phpt index 376d18f790b91..30bd6094aa083 100644 --- a/ext/gd/tests/imagesetthickness_basic.phpt +++ b/ext/gd/tests/imagesetthickness_basic.phpt @@ -4,8 +4,8 @@ Testing imagetruecolortopalette() of GD library Rafael Dohms --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- #testfest PHPSP on 2009-06-20 --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/gd/tests/imagewbmp_nullbyte_injection.phpt b/ext/gd/tests/imagewbmp_nullbyte_injection.phpt index 8f2bdcec5951e..d7c3f0c41617b 100644 --- a/ext/gd/tests/imagewbmp_nullbyte_injection.phpt +++ b/ext/gd/tests/imagewbmp_nullbyte_injection.phpt @@ -5,7 +5,7 @@ Testing null byte injection in imagewbmp 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-- diff --git a/ext/gd/tests/imagewebp_nullbyte_injection.phpt b/ext/gd/tests/imagewebp_nullbyte_injection.phpt index c48fd7d821fd0..52ecc59941247 100644 --- a/ext/gd/tests/imagewebp_nullbyte_injection.phpt +++ b/ext/gd/tests/imagewebp_nullbyte_injection.phpt @@ -5,7 +5,7 @@ Testing null byte injection in imagewebp 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-- diff --git a/ext/gd/tests/jpeg2png.phpt b/ext/gd/tests/jpeg2png.phpt index dfcd1ef1a264f..cae283d10b968 100644 --- a/ext/gd/tests/jpeg2png.phpt +++ b/ext/gd/tests/jpeg2png.phpt @@ -2,16 +2,16 @@ jpeg <--> png conversion test --SKIPIF-- --FILE-- gd1/gd2 conversion test --SKIPIF-- --FILE-- gd1/gd2 conversion test --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- gd1/gd2 conversion test --SKIPIF-- --FILE-- --FILE-- png conversion test --SKIPIF-- --FILE-- gd1/gd2 conversion test --SKIPIF-- --FILE-- jpeg conversion test --SKIPIF-- --FILE-- png conversion test --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/gettext/tests/gettext_basic-enus.phpt b/ext/gettext/tests/gettext_basic-enus.phpt index edbd31cc48180..6fcd5bed80499 100644 --- a/ext/gettext/tests/gettext_basic-enus.phpt +++ b/ext/gettext/tests/gettext_basic-enus.phpt @@ -2,12 +2,12 @@ Gettext basic test with en_US locale that should be on nearly every system --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- =")) { - die("skip your GMP is too old and will crash"); + die("skip your GMP is too old and will crash"); } ?> --FILE-- diff --git a/ext/gmp/tests/gmp_setbit_long.phpt b/ext/gmp/tests/gmp_setbit_long.phpt index 065c8f8208fd6..a967a80d76fd7 100644 --- a/ext/gmp/tests/gmp_setbit_long.phpt +++ b/ext/gmp/tests/gmp_setbit_long.phpt @@ -6,19 +6,19 @@ gmp_setbit() with large index --FILE-- diff --git a/ext/iconv/tests/bug37773.phpt b/ext/iconv/tests/bug37773.phpt index e2fb6a55e6a8b..3b520c6e022a3 100644 --- a/ext/iconv/tests/bug37773.phpt +++ b/ext/iconv/tests/bug37773.phpt @@ -6,7 +6,7 @@ include('skipif.inc'); $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?"); } ?> diff --git a/ext/iconv/tests/iconv002.phpt b/ext/iconv/tests/iconv002.phpt index 6be5a86a69eba..c43402262ece5 100644 --- a/ext/iconv/tests/iconv002.phpt +++ b/ext/iconv/tests/iconv002.phpt @@ -4,7 +4,7 @@ iconv() test 2 (UCS4BE to ASCII) --INI-- diff --git a/ext/imap/tests/CONFLICTS b/ext/imap/tests/CONFLICTS new file mode 100644 index 0000000000000..c301c0ffaca1d --- /dev/null +++ b/ext/imap/tests/CONFLICTS @@ -0,0 +1 @@ +imap diff --git a/ext/imap/tests/bug45705_1.phpt b/ext/imap/tests/bug45705_1.phpt index f699451407e11..05d3a0a2f6b9d 100644 --- a/ext/imap/tests/bug45705_1.phpt +++ b/ext/imap/tests/bug45705_1.phpt @@ -2,9 +2,9 @@ Bug #45705 test #1 (imap rfc822_parse_adrlist() modifies passed address parameter) --SKIPIF-- --FILE-- --FILE-- getMessage() . "\n"; +} catch (\TypeError $e) { + echo $e->getMessage() . "\n"; } fclose($var1); @@ -22,5 +22,4 @@ unlink($fn); ?> --EXPECTF-- Warning: imap_append(): Internal date not correctly formatted in %s on line %d - -Exception: imap_append(): Supplied resource is not a valid imap resource +imap_append(): supplied resource is not a valid imap resource diff --git a/ext/imap/tests/bug77153.phpt b/ext/imap/tests/bug77153.phpt index 63590aee1dde4..7b759621fe16f 100644 --- a/ext/imap/tests/bug77153.phpt +++ b/ext/imap/tests/bug77153.phpt @@ -2,8 +2,8 @@ Bug #77153 (imap_open allows to run arbitrary shell commands via mailbox parameter) --SKIPIF-- --FILE-- diff --git a/ext/imap/tests/dovecot.conf b/ext/imap/tests/dovecot.conf new file mode 100644 index 0000000000000..c465ba3ce9121 --- /dev/null +++ b/ext/imap/tests/dovecot.conf @@ -0,0 +1,33 @@ +# 2.2.33.2 (d6601f4ec): /etc/dovecot/dovecot.conf +# Pigeonhole version 0.4.21 (92477967) +listen = *, :: + +# To make authentication work +ssl = no +disable_plaintext_auth = no + +auth_mechanisms = plain cram-md5 +auth_username_format = %u +auth_debug = yes +auth_verbose = yes +#log +log_path = /var/log/dovecot.log +# If not set, use the value from log_path +info_log_path = /var/log/dovecot-info.log +# If not set, use the value from info_log_path +debug_log_path = /var/log/dovecot-debug.log +## Mailbox locations and namespaces +mail_location = maildir:/var/vmail/dovecot/mail/%d/%n/Maildir +passdb { + args = scheme=cram-md5 /etc/dovecot/dovecotpass + driver = passwd-file +} +protocols = imap +service auth { + user = root +} +userdb { + args = /etc/dovecot/dovecotpass + driver = passwd-file + override_fields = home=/var/vmail/dovecot/mail/%d/%n +} diff --git a/ext/imap/tests/dovecotpass b/ext/imap/tests/dovecotpass new file mode 100644 index 0000000000000..86a069fc4f699 --- /dev/null +++ b/ext/imap/tests/dovecotpass @@ -0,0 +1 @@ +webmaster@something.com:{CRAM-MD5}be5f3177e9c7c06403272f25d983ba630df4ef40476b353bb3087a8401713451:vmail:vmail diff --git a/ext/imap/tests/imap_body.phpt b/ext/imap/tests/imap_body.phpt index a4e8069d040d9..4d4133c343fc7 100644 --- a/ext/imap/tests/imap_body.phpt +++ b/ext/imap/tests/imap_body.phpt @@ -9,16 +9,11 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_body() expects at least 2 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_body() expects at least 2 parameters, 1 given in %s on line %d - Warning: imap_body(): Bad message number in %s on line %d Warning: imap_body(): Invalid value for the options parameter in %s on line %d diff --git a/ext/imap/tests/imap_fetch_overview_variation3.phpt b/ext/imap/tests/imap_fetch_overview_variation3.phpt index 13b5591dc5b0e..419de4c95152f 100644 --- a/ext/imap/tests/imap_fetch_overview_variation3.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation3.phpt @@ -58,7 +58,7 @@ imap_fetch_overview() returns an object Testing with option value:bool(true) imap_fetch_overview() returns an object -Testing with option value:float(1) +Testing with option value:float(1.000000000000001) imap_fetch_overview() returns an object Testing with option value:float(1) diff --git a/ext/imap/tests/imap_fetchbody_variation6.phpt b/ext/imap/tests/imap_fetchbody_variation6.phpt index 20ac49edc8a38..75516f8381454 100644 --- a/ext/imap/tests/imap_fetchbody_variation6.phpt +++ b/ext/imap/tests/imap_fetchbody_variation6.phpt @@ -19,9 +19,7 @@ require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 3); // set up temp mailbox with simple msgs $section = 1; -$sequences = array (0, 4, // out of range - '1,3', '1:3', // message sequences instead of numbers - ); +$sequences = [0, /* out of range */ 4, 1]; foreach($sequences as $msg_no) { echo "\n-- \$msg_no is $msg_no --\n"; @@ -52,12 +50,6 @@ Warning: imap_fetchbody(): Bad message number in %s on line %d bool(false) --- $msg_no is 1,3 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(%d) "1: this is a test message, please ignore%a" - --- $msg_no is 1:3 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(%d) "1: this is a test message, please ignore%a" +-- $msg_no is 1 -- +string(42) "1: this is a test message, please ignore +" diff --git a/ext/imap/tests/imap_fetchheader_variation5.phpt b/ext/imap/tests/imap_fetchheader_variation5.phpt index 7ff8ca697e777..2283861df8e8a 100644 --- a/ext/imap/tests/imap_fetchheader_variation5.phpt +++ b/ext/imap/tests/imap_fetchheader_variation5.phpt @@ -17,9 +17,7 @@ require_once(__DIR__.'/imap_include.inc'); $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs -$sequences = array (0, 4, // out of range - '1,3', '1:3', // message sequences instead of numbers - ); +$sequences = [0, /* out of range */ 4, 1]; foreach($sequences as $msg_no) { echo "\n-- \$msg_no is $msg_no --\n"; @@ -53,24 +51,11 @@ Warning: imap_fetchheader(): Bad message number in %s on line %d bool(false) --- $msg_no is 1,3 -- - -Notice: A non well formed numeric value encountered in %s on line %d -string(%d) "From: foo@anywhere.com -Subject: Test msg 1 -To: %s -MIME-Version: 1.0 -Content-Type: MULTIPART/mixed; BOUNDARY="%s" - -" - --- $msg_no is 1:3 -- - -Notice: A non well formed numeric value encountered in %s on line %d +-- $msg_no is 1 -- string(%d) "From: foo@anywhere.com Subject: Test msg 1 -To: %s +To: webmaster@something.com MIME-Version: 1.0 -Content-Type: MULTIPART/mixed; BOUNDARY="%s" +Content-Type: MULTIPART/mixed; BOUNDARY="%s=:%d" " diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt index 0ff266a390c83..572556e6e13d1 100644 --- a/ext/imap/tests/imap_fetchstructure_basic.phpt +++ b/ext/imap/tests/imap_fetchstructure_basic.phpt @@ -8,17 +8,10 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_fetchstructure() expects at least 2 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d - -Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - -Warning: imap_fetchstructure() expects at least 2 parameters, 1 given in %s on line %d +.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created bool(true) bool(true) bool(true) diff --git a/ext/imap/tests/imap_gc_error.phpt b/ext/imap/tests/imap_gc_error.phpt index 2d825ce1fdf19..072af103930cb 100644 --- a/ext/imap/tests/imap_gc_error.phpt +++ b/ext/imap/tests/imap_gc_error.phpt @@ -9,12 +9,6 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_gc() Expects exactly 2 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_gc(): Argument #1 must be of type resource, string given in %s on line %d - -Warning: imap_gc(): Argument #1 must be of type resource, bool given in %s on line %d - Warning: imap_gc(): Invalid value for the flags parameter in %s on line %d diff --git a/ext/imap/tests/imap_getsubscribed_basic.phpt b/ext/imap/tests/imap_getsubscribed_basic.phpt index 8995eadd05289..bba82271c7ca3 100644 --- a/ext/imap/tests/imap_getsubscribed_basic.phpt +++ b/ext/imap/tests/imap_getsubscribed_basic.phpt @@ -8,19 +8,11 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_getsubscribed() expects exactly 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_getsubscribed() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_getsubscribed() expects exactly 3 parameters, 2 given in %s on line %d bool(false) Checking OK bool(true) diff --git a/ext/imap/tests/imap_include.inc b/ext/imap/tests/imap_include.inc index 7de634075a295..e57d6516979f2 100644 --- a/ext/imap/tests/imap_include.inc +++ b/ext/imap/tests/imap_include.inc @@ -1,6 +1,6 @@ --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_list() expects exactly 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_list() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_list() expects exactly 3 parameters, 2 given in %s on line %d bool(true) string(%s) "{%s}%s" diff --git a/ext/imap/tests/imap_lsub_basic.phpt b/ext/imap/tests/imap_lsub_basic.phpt index 591a023ed8696..98875266d7406 100644 --- a/ext/imap/tests/imap_lsub_basic.phpt +++ b/ext/imap/tests/imap_lsub_basic.phpt @@ -8,19 +8,11 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_lsub() expects exactly 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_lsub() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_lsub() expects exactly 3 parameters, 2 given in %s on line %d bool(false) Checking OK bool(true) diff --git a/ext/imap/tests/imap_open_error.phpt b/ext/imap/tests/imap_open_error.phpt index b94c11d797afd..f9410519f2159 100644 --- a/ext/imap/tests/imap_open_error.phpt +++ b/ext/imap/tests/imap_open_error.phpt @@ -9,12 +9,6 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_open() expects at least 3 parameters, 0 given in %s on line %d - -Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d - -Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d - -Warning: imap_open() expects at least 3 parameters, 1 given in %s on line %d - -Warning: imap_open() expects at least 3 parameters, 2 given in %s on line %d Checking with incorrect parameters Warning: imap_open(): Couldn't open stream in %s on line %d diff --git a/ext/imap/tests/imap_renamemailbox_basic.phpt b/ext/imap/tests/imap_renamemailbox_basic.phpt index ee5ccb2be7234..c6b1812d165b5 100644 --- a/ext/imap/tests/imap_renamemailbox_basic.phpt +++ b/ext/imap/tests/imap_renamemailbox_basic.phpt @@ -8,13 +8,6 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_renamemailbox() expects exactly 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_renamemailbox() expects exactly 3 parameters, 1 given in %s on line %d - -Warning: imap_renamemailbox() expects exactly 3 parameters, 1 given in %s on line %d Create a temporary mailbox and add 1 msgs .. mailbox '{%s}%s' created - -Warning: imap_renamemailbox() expects exactly 3 parameters, 2 given in %s on line %d - -Warning: imap_renamemailbox() expects exactly 3 parameters, 2 given in %s on line %d Checking OK bool(true) bool(true) diff --git a/ext/imap/tests/imap_savebody_basic.phpt b/ext/imap/tests/imap_savebody_basic.phpt index 2be987a3617c3..ccbaa1ba66cc4 100644 --- a/ext/imap/tests/imap_savebody_basic.phpt +++ b/ext/imap/tests/imap_savebody_basic.phpt @@ -8,18 +8,10 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_savebody() expects at least 3 parameters, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d - -Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d Create a temporary mailbox and add 1 msgs -.. mailbox '{%s}%s' created - -Warning: imap_savebody() expects at least 3 parameters, 1 given in %s on line %d +.. mailbox '{127.0.0.1:143/norsh}INBOX.phpttest' created bool(true) Size: %d bool(true) diff --git a/ext/imap/tests/imap_timeout_basic.phpt b/ext/imap/tests/imap_timeout_basic.phpt index e1b958b3c77ef..f9618c3e3a33d 100644 --- a/ext/imap/tests/imap_timeout_basic.phpt +++ b/ext/imap/tests/imap_timeout_basic.phpt @@ -8,12 +8,6 @@ require_once(__DIR__.'/skipif.inc'); ?> --FILE-- --EXPECTF-- -Checking with no parameters - -Warning: imap_timeout() expects at least 1 argument, 0 given in %s on line %d -Checking with incorrect parameter type - -Warning: imap_timeout(): Argument #1 must be of type int, %s given in %s on line %d GET values: int(%d) int(%d) diff --git a/ext/imap/tests/setup.sh b/ext/imap/tests/setup.sh new file mode 100644 index 0000000000000..5cb18334a3f95 --- /dev/null +++ b/ext/imap/tests/setup.sh @@ -0,0 +1,6 @@ +sudo service dovecot stop +sudo groupadd -g 5000 vmail +sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail +sudo cp ext/imap/tests/dovecot.conf /etc/dovecot/dovecot.conf +sudo cp ext/imap/tests/dovecotpass /etc/dovecot/dovecotpass +sudo service dovecot start diff --git a/ext/imap/tests/skipif.inc b/ext/imap/tests/skipif.inc index 2820bff5c69f4..2167ad1d0cd65 100644 --- a/ext/imap/tests/skipif.inc +++ b/ext/imap/tests/skipif.inc @@ -2,7 +2,7 @@ extension_loaded('imap') or die('skip imap extension not available in this build'); // Change these to make tests run successfully -$mailbox = '{localhost/norsh}'; +$mailbox = '{127.0.0.1:143/debug/norsh}'; $username = 'webmaster@something.com'; $password = 'p4ssw0rd'; $options = OP_HALFOPEN; // this should be enough to verify server present diff --git a/ext/intl/tests/breakiter___construct.phpt b/ext/intl/tests/breakiter___construct.phpt index 16ca32bf184f6..716de728ae7b6 100644 --- a/ext/intl/tests/breakiter___construct.phpt +++ b/ext/intl/tests/breakiter___construct.phpt @@ -3,7 +3,7 @@ IntlBreakIterator::__construct() should not be callable --SKIPIF-- 0) die('skip for ICU <= 57.1'); ?> --FILE-- diff --git a/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt b/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt index 834da13ecea7d..826f57e45ab9e 100644 --- a/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt +++ b/ext/intl/tests/breakiter_getPartsIterator_basic2.phpt @@ -3,7 +3,7 @@ IntlBreakIterator::getPartsIterator(): basic test, ICU >= 58.1 --SKIPIF-- = 58.1'); ?> --FILE-- diff --git a/ext/intl/tests/breakiter_getPartsIterator_error.phpt b/ext/intl/tests/breakiter_getPartsIterator_error.phpt index f86e64d4ccdd7..cd518b19d4d02 100644 --- a/ext/intl/tests/breakiter_getPartsIterator_error.phpt +++ b/ext/intl/tests/breakiter_getPartsIterator_error.phpt @@ -3,7 +3,7 @@ IntlBreakIterator::getPartsIterator(): bad args --SKIPIF-- 0) die('skip for ICU <= 57.1'); ?> --FILE-- diff --git a/ext/intl/tests/breakiter_preceding_basic2.phpt b/ext/intl/tests/breakiter_preceding_basic2.phpt index 8c1ee625e4517..53446b2f6bc2c 100644 --- a/ext/intl/tests/breakiter_preceding_basic2.phpt +++ b/ext/intl/tests/breakiter_preceding_basic2.phpt @@ -3,7 +3,7 @@ IntlBreakIterator::preceding(): basic test, ICU >= 58.1 --SKIPIF-- = 58.1'); --FILE-- = 0) - die('skip for ICU < 51.2'); + die('skip for ICU < 51.2'); ?> --FILE-- = 51.2'); + die('skip for ICU >= 51.2'); ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- = 0) - die('skip for ICU < 52.1'); + die('skip for ICU < 52.1'); --FILE-- = 52.1'); + die('skip for ICU >= 52.1'); --FILE-- 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-- + die('skip intl extension not enabled'); ?> = 52'); ?> = 0) die('skip for ICU <= 57.1'); ?> --FILE-- diff --git a/ext/intl/tests/timezone_IDforWindowsID_basic2.phpt b/ext/intl/tests/timezone_IDforWindowsID_basic2.phpt index 5008c2b66ab95..064c5826d8743 100644 --- a/ext/intl/tests/timezone_IDforWindowsID_basic2.phpt +++ b/ext/intl/tests/timezone_IDforWindowsID_basic2.phpt @@ -3,7 +3,7 @@ IntlTimeZone::getIDForWindowsID basic test --SKIPIF-- + die('skip intl extension not enabled'); ?> = 58.1'); ?> --FILE-- int cast behavior. */ $arch = php_uname('m'); if ($arch != 'x86_64' && $arch != 'i386') diff --git a/ext/intl/tests/timezone_getErrorCode_error.phpt b/ext/intl/tests/timezone_getErrorCode_error.phpt index c20e3c666a020..c44a9107261fd 100644 --- a/ext/intl/tests/timezone_getErrorCode_error.phpt +++ b/ext/intl/tests/timezone_getErrorCode_error.phpt @@ -3,7 +3,7 @@ IntlTimeZone::getErrorCode(): errors --SKIPIF-- int cast behavior. */ $arch = php_uname('m'); diff --git a/ext/intl/tests/timezone_getRawOffset_basic.phpt b/ext/intl/tests/timezone_getRawOffset_basic.phpt index bfbf2710cac34..6f85e9fc9c6f2 100644 --- a/ext/intl/tests/timezone_getRawOffset_basic.phpt +++ b/ext/intl/tests/timezone_getRawOffset_basic.phpt @@ -3,7 +3,7 @@ IntlTimeZone::getRawOffset(): basic test --SKIPIF-- + die('skip intl extension not enabled'); ?> = 52'); ?> = 0) die('skip for ICU <= 57.1'); ?> --FILE-- diff --git a/ext/intl/tests/timezone_windowsID_basic2.phpt b/ext/intl/tests/timezone_windowsID_basic2.phpt index 7c00b646b6484..32f80596c4bfe 100644 --- a/ext/intl/tests/timezone_windowsID_basic2.phpt +++ b/ext/intl/tests/timezone_windowsID_basic2.phpt @@ -3,7 +3,7 @@ IntlTimeZone::getWindowsID basic test --SKIPIF-- + die('skip intl extension not enabled'); ?> = 58.1'); ?> --FILE-- --INI-- diff --git a/ext/json/tests/bug42785.phpt b/ext/json/tests/bug42785.phpt index 7c39f4c8e2992..698f193a70881 100644 --- a/ext/json/tests/bug42785.phpt +++ b/ext/json/tests/bug42785.phpt @@ -5,7 +5,7 @@ serialize_precision=-1 --SKIPIF-- --FILE-- diff --git a/ext/ldap/tests/ldap_exop_refresh.phpt b/ext/ldap/tests/ldap_exop_refresh.phpt index b90a92bc00a65..b7e7835f384cc 100644 --- a/ext/ldap/tests/ldap_exop_refresh.phpt +++ b/ext/ldap/tests/ldap_exop_refresh.phpt @@ -6,12 +6,12 @@ Emmanuel Dreyfus --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --INI-- diff --git a/ext/mbstring/tests/htmlent.phpt b/ext/mbstring/tests/htmlent.phpt index eb251efd7bf81..cecd1c35393be 100644 --- a/ext/mbstring/tests/htmlent.phpt +++ b/ext/mbstring/tests/htmlent.phpt @@ -2,8 +2,8 @@ HTML input/output --SKIPIF-- --INI-- output_buffering=4096 diff --git a/ext/mbstring/tests/mb_send_mail01.phpt b/ext/mbstring/tests/mb_send_mail01.phpt index 283ff11d6baab..96eecbb625601 100644 --- a/ext/mbstring/tests/mb_send_mail01.phpt +++ b/ext/mbstring/tests/mb_send_mail01.phpt @@ -3,10 +3,10 @@ mb_send_mail() test 1 (lang=neutral) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail02.phpt b/ext/mbstring/tests/mb_send_mail02.phpt index 06b85c691f5bd..026d794e40e05 100644 --- a/ext/mbstring/tests/mb_send_mail02.phpt +++ b/ext/mbstring/tests/mb_send_mail02.phpt @@ -3,10 +3,10 @@ mb_send_mail() test 2 (lang=Japanese) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail03.phpt b/ext/mbstring/tests/mb_send_mail03.phpt index 3d5ffd5659535..acc152f720363 100644 --- a/ext/mbstring/tests/mb_send_mail03.phpt +++ b/ext/mbstring/tests/mb_send_mail03.phpt @@ -3,10 +3,10 @@ mb_send_mail() test 3 (lang=English) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail04.phpt b/ext/mbstring/tests/mb_send_mail04.phpt index 2eccb87189aaa..9e68128140731 100644 --- a/ext/mbstring/tests/mb_send_mail04.phpt +++ b/ext/mbstring/tests/mb_send_mail04.phpt @@ -3,10 +3,10 @@ mb_send_mail() test 4 (lang=German) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail05.phpt b/ext/mbstring/tests/mb_send_mail05.phpt index 53d97ef3d18b2..f4c07e26f8b2b 100644 --- a/ext/mbstring/tests/mb_send_mail05.phpt +++ b/ext/mbstring/tests/mb_send_mail05.phpt @@ -3,13 +3,13 @@ mb_send_mail() test 5 (lang=Simplified Chinese) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail06.phpt b/ext/mbstring/tests/mb_send_mail06.phpt index 44a877aaee528..521a976ca39c5 100644 --- a/ext/mbstring/tests/mb_send_mail06.phpt +++ b/ext/mbstring/tests/mb_send_mail06.phpt @@ -3,13 +3,13 @@ mb_send_mail() test 6 (lang=Traditional Chinese) --SKIPIF-- --INI-- diff --git a/ext/mbstring/tests/mb_send_mail07.phpt b/ext/mbstring/tests/mb_send_mail07.phpt index 9640abc1e88a0..eb702b690ae4e 100644 --- a/ext/mbstring/tests/mb_send_mail07.phpt +++ b/ext/mbstring/tests/mb_send_mail07.phpt @@ -3,13 +3,13 @@ mb_send_mail() test 7 (lang=Korean) --SKIPIF-- --INI-- diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 64601e66b4eda..9eb1885ea6ffb 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1094,6 +1094,7 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend case 3:llval = (my_ulonglong) bit_uint3korr(row[i]);break; case 2:llval = (my_ulonglong) bit_uint2korr(row[i]);break; case 1:llval = (my_ulonglong) uint1korr(row[i]);break; + EMPTY_SWITCH_DEFAULT_CASE() } /* even though lval is declared as unsigned, the value * may be negative. Therefor we cannot use MYSQLI_LLU_SPEC and must diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index a22e710c75931..aa283505e1372 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -1885,7 +1885,11 @@ PHP_FUNCTION(mysqli_real_query) } /* }}} */ -/* {{{ Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection */ +#if defined(PDO_USE_MYSQLND) || MYSQL_VERSION_ID < 50707 || defined(MARIADB_BASE_VERSION) +# define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ + mysql_real_escape_string(mysql, to, from, length) +#endif + PHP_FUNCTION(mysqli_real_escape_string) { MY_MYSQL *mysql; zval *mysql_link = NULL; @@ -1899,12 +1903,11 @@ PHP_FUNCTION(mysqli_real_escape_string) { MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); newstr = zend_string_alloc(2 * escapestr_len, 0); - ZSTR_LEN(newstr) = mysql_real_escape_string(mysql->mysql, ZSTR_VAL(newstr), escapestr, escapestr_len); + ZSTR_LEN(newstr) = mysql_real_escape_string_quote(mysql->mysql, ZSTR_VAL(newstr), escapestr, escapestr_len, '\''); newstr = zend_string_truncate(newstr, ZSTR_LEN(newstr), 0); RETURN_NEW_STR(newstr); } -/* }}} */ /* {{{ Undo actions from current transaction */ PHP_FUNCTION(mysqli_rollback) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 03e975462e6ff..85c08c5b2f7da 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -1040,6 +1040,7 @@ PHP_FUNCTION(mysqli_set_charset) MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID); if (mysql_set_character_set(mysql->mysql, cs_name)) { + MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); RETURN_FALSE; } RETURN_TRUE; @@ -1109,45 +1110,43 @@ extern char * mysqli_escape_string_for_tx_name_in_comment(const char * const nam static int mysqli_begin_transaction_libmysql(MYSQL * conn, const unsigned int mode, const char * const name) { int ret; - zend_bool err = FALSE; smart_str tmp_str = {0}; + char * name_esc; + char * query; + unsigned int query_len; if (mode & TRANS_START_WITH_CONSISTENT_SNAPSHOT) { if (tmp_str.s) { smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); } smart_str_appendl(&tmp_str, "WITH CONSISTENT SNAPSHOT", sizeof("WITH CONSISTENT SNAPSHOT") - 1); } - if (mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY)) { - if (mysql_get_server_version(conn) < 50605L) { - php_error_docref(NULL, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required"); - err = TRUE; - } else if (mode & TRANS_START_READ_WRITE) { - if (tmp_str.s) { - smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); - } - smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1); - } else if (mode & TRANS_START_READ_ONLY) { - if (tmp_str.s) { - smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); - } - smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1); + if (mode & TRANS_START_READ_WRITE) { + if (tmp_str.s) { + smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); + } + smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1); + } else if (mode & TRANS_START_READ_ONLY) { + if (tmp_str.s) { + smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); } + smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1); } smart_str_0(&tmp_str); - if (err == FALSE){ - char * name_esc = mysqli_escape_string_for_tx_name_in_comment(name); - char * query; - unsigned int query_len = spprintf(&query, 0, "START TRANSACTION%s %s", - name_esc? name_esc:"", tmp_str.s? ZSTR_VAL(tmp_str.s):""); + name_esc = mysqli_escape_string_for_tx_name_in_comment(name); + query_len = spprintf(&query, 0, "START TRANSACTION%s %s", + name_esc? name_esc:"", tmp_str.s? ZSTR_VAL(tmp_str.s):""); - smart_str_free(&tmp_str); - if (name_esc) { - efree(name_esc); - } + smart_str_free(&tmp_str); + if (name_esc) { + efree(name_esc); + } + + ret = mysql_real_query(conn, query, query_len); + efree(query); - ret = mysql_real_query(conn, query, query_len); - efree(query); + if (ret && mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY) && mysql_errno(conn) == 1064) { + php_error_docref(NULL, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required"); } return ret; } diff --git a/ext/mysqli/tests/002.phpt b/ext/mysqli/tests/002.phpt index 0960da7a98c11..322cbb2ee3d01 100644 --- a/ext/mysqli/tests/002.phpt +++ b/ext/mysqli/tests/002.phpt @@ -53,7 +53,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/003.phpt b/ext/mysqli/tests/003.phpt index faf3407bd7364..56a26602dfc03 100644 --- a/ext/mysqli/tests/003.phpt +++ b/ext/mysqli/tests/003.phpt @@ -79,7 +79,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index 0c246e0b2b28b..22a7712dbac3a 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -57,7 +57,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/005.phpt b/ext/mysqli/tests/005.phpt index 2dffee80c2022..ce0a9a886071e 100644 --- a/ext/mysqli/tests/005.phpt +++ b/ext/mysqli/tests/005.phpt @@ -47,7 +47,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/006.phpt b/ext/mysqli/tests/006.phpt index 5e0443a9fb741..534ef4261fc47 100644 --- a/ext/mysqli/tests/006.phpt +++ b/ext/mysqli/tests/006.phpt @@ -52,7 +52,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/007.phpt b/ext/mysqli/tests/007.phpt index b510d8d8a32d8..7e71476a3a969 100644 --- a/ext/mysqli/tests/007.phpt +++ b/ext/mysqli/tests/007.phpt @@ -52,7 +52,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/008.phpt b/ext/mysqli/tests/008.phpt index 412c3641e5a8a..37b75bb5b9835 100644 --- a/ext/mysqli/tests/008.phpt +++ b/ext/mysqli/tests/008.phpt @@ -52,7 +52,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/009.phpt b/ext/mysqli/tests/009.phpt index 187ac3f9a35ec..f245c71f5dcdb 100644 --- a/ext/mysqli/tests/009.phpt +++ b/ext/mysqli/tests/009.phpt @@ -2,12 +2,12 @@ mysqli fetch bigint values (ok to fail with 4.1.x) --SKIPIF-- --FILE-- diff --git a/ext/mysqli/tests/010.phpt b/ext/mysqli/tests/010.phpt index 4da24b680add6..9ddac0931fce6 100644 --- a/ext/mysqli/tests/010.phpt +++ b/ext/mysqli/tests/010.phpt @@ -55,7 +55,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/011.phpt b/ext/mysqli/tests/011.phpt index 4be6fe62c59d7..db327e2d32782 100644 --- a/ext/mysqli/tests/011.phpt +++ b/ext/mysqli/tests/011.phpt @@ -52,7 +52,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/012.phpt b/ext/mysqli/tests/012.phpt index c2981a206cfa6..89303e57891cc 100644 --- a/ext/mysqli/tests/012.phpt +++ b/ext/mysqli/tests/012.phpt @@ -51,7 +51,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/013.phpt b/ext/mysqli/tests/013.phpt index 21cb6a949e873..c8aaa73d8427b 100644 --- a/ext/mysqli/tests/013.phpt +++ b/ext/mysqli/tests/013.phpt @@ -60,7 +60,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/014.phpt b/ext/mysqli/tests/014.phpt index cb100001c5498..bc5d906d934ad 100644 --- a/ext/mysqli/tests/014.phpt +++ b/ext/mysqli/tests/014.phpt @@ -2,16 +2,16 @@ mysqli autocommit/commit/rollback --SKIPIF-- errno, $link->error)); + if (!have_innodb($link)) + die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- --CLEAN-- --EXPECT-- Num_of_rows=1 diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt index 099fcff24eca3..a179e8ec5a4d9 100644 --- a/ext/mysqli/tests/015.phpt +++ b/ext/mysqli/tests/015.phpt @@ -2,15 +2,15 @@ mysqli autocommit/commit/rollback with innodb --SKIPIF-- errno, $link->error)); + if (!have_innodb($link)) + die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/019.phpt b/ext/mysqli/tests/019.phpt index d35b162cd714f..6d64a17601477 100644 --- a/ext/mysqli/tests/019.phpt +++ b/ext/mysqli/tests/019.phpt @@ -62,7 +62,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/020.phpt b/ext/mysqli/tests/020.phpt index f1409248c2901..a2a8782f0fd5e 100644 --- a/ext/mysqli/tests/020.phpt +++ b/ext/mysqli/tests/020.phpt @@ -74,7 +74,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/021.phpt b/ext/mysqli/tests/021.phpt index 3fa3b9a5cc967..fd2d4f0e2b68d 100644 --- a/ext/mysqli/tests/021.phpt +++ b/ext/mysqli/tests/021.phpt @@ -45,7 +45,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/022.phpt b/ext/mysqli/tests/022.phpt index d12ba4aff9ecf..d591e5bae1349 100644 --- a/ext/mysqli/tests/022.phpt +++ b/ext/mysqli/tests/022.phpt @@ -50,7 +50,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/023.phpt b/ext/mysqli/tests/023.phpt index 7c22704d441d7..a23e6e15ecfb1 100644 --- a/ext/mysqli/tests/023.phpt +++ b/ext/mysqli/tests/023.phpt @@ -59,7 +59,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/024.phpt b/ext/mysqli/tests/024.phpt index 5be231c27d0f3..dec1e284be43b 100644 --- a/ext/mysqli/tests/024.phpt +++ b/ext/mysqli/tests/024.phpt @@ -59,7 +59,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/025.phpt b/ext/mysqli/tests/025.phpt index 6e300890d7df3..62b1590d29b67 100644 --- a/ext/mysqli/tests/025.phpt +++ b/ext/mysqli/tests/025.phpt @@ -64,7 +64,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/026.phpt b/ext/mysqli/tests/026.phpt index 1db5f5af84496..7f9a9bd4b8c53 100644 --- a/ext/mysqli/tests/026.phpt +++ b/ext/mysqli/tests/026.phpt @@ -51,7 +51,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/029.phpt b/ext/mysqli/tests/029.phpt index 0ed2517227df2..769f3753f4066 100644 --- a/ext/mysqli/tests/029.phpt +++ b/ext/mysqli/tests/029.phpt @@ -33,7 +33,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/032.phpt b/ext/mysqli/tests/032.phpt index 660950d6f1e9d..ea7d13bc9bf9a 100644 --- a/ext/mysqli/tests/032.phpt +++ b/ext/mysqli/tests/032.phpt @@ -33,7 +33,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/036.phpt b/ext/mysqli/tests/036.phpt index af6d81d64e1b9..04fa7023bef31 100644 --- a/ext/mysqli/tests/036.phpt +++ b/ext/mysqli/tests/036.phpt @@ -2,12 +2,12 @@ function test: mysqli_insert_id() --SKIPIF-- --FILE-- diff --git a/ext/mysqli/tests/037.phpt b/ext/mysqli/tests/037.phpt index 7c6f72cb69a7b..93b2ceace61d7 100644 --- a/ext/mysqli/tests/037.phpt +++ b/ext/mysqli/tests/037.phpt @@ -39,7 +39,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/038.phpt b/ext/mysqli/tests/038.phpt index 63d7e3ee326d3..9719d93049d74 100644 --- a/ext/mysqli/tests/038.phpt +++ b/ext/mysqli/tests/038.phpt @@ -39,7 +39,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/040.phpt b/ext/mysqli/tests/040.phpt index 782cbe57ade5f..04d839408e707 100644 --- a/ext/mysqli/tests/040.phpt +++ b/ext/mysqli/tests/040.phpt @@ -38,7 +38,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/041.phpt b/ext/mysqli/tests/041.phpt index 645a82e419691..d64739d79ed8b 100644 --- a/ext/mysqli/tests/041.phpt +++ b/ext/mysqli/tests/041.phpt @@ -29,7 +29,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/042.phpt b/ext/mysqli/tests/042.phpt index 8b46049cb8f1d..3545ed06c1a76 100644 --- a/ext/mysqli/tests/042.phpt +++ b/ext/mysqli/tests/042.phpt @@ -55,7 +55,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/043.phpt b/ext/mysqli/tests/043.phpt index 2e265d7c51772..adcf502dc72ee 100644 --- a/ext/mysqli/tests/043.phpt +++ b/ext/mysqli/tests/043.phpt @@ -47,7 +47,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/045.phpt b/ext/mysqli/tests/045.phpt index af38b6786dea5..8486f1003e665 100644 --- a/ext/mysqli/tests/045.phpt +++ b/ext/mysqli/tests/045.phpt @@ -2,20 +2,20 @@ mysqli_stmt_bind_result (SHOW) --SKIPIF-- 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-- diff --git a/ext/mysqli/tests/047.phpt b/ext/mysqli/tests/047.phpt index 4a2c9590cfd6b..376bcb59c5078 100644 --- a/ext/mysqli/tests/047.phpt +++ b/ext/mysqli/tests/047.phpt @@ -52,7 +52,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/048.phpt b/ext/mysqli/tests/048.phpt index 20271e43fb828..be5f5a79f1809 100644 --- a/ext/mysqli/tests/048.phpt +++ b/ext/mysqli/tests/048.phpt @@ -47,7 +47,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/057.phpt b/ext/mysqli/tests/057.phpt index 7c4f149c4870c..7d968a18b2ec3 100644 --- a/ext/mysqli/tests/057.phpt +++ b/ext/mysqli/tests/057.phpt @@ -68,7 +68,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/058.phpt b/ext/mysqli/tests/058.phpt index 596b28569ec3e..541be1ede402c 100644 --- a/ext/mysqli/tests/058.phpt +++ b/ext/mysqli/tests/058.phpt @@ -55,7 +55,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/059.phpt b/ext/mysqli/tests/059.phpt index c7f3877201185..7168f6f8fafd3 100644 --- a/ext/mysqli/tests/059.phpt +++ b/ext/mysqli/tests/059.phpt @@ -48,7 +48,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/060.phpt b/ext/mysqli/tests/060.phpt index 22732f4ef1973..c5a77ec16d37a 100644 --- a/ext/mysqli/tests/060.phpt +++ b/ext/mysqli/tests/060.phpt @@ -49,7 +49,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt index 0b15b2ea856d7..76a40c704e2bd 100644 --- a/ext/mysqli/tests/061.phpt +++ b/ext/mysqli/tests/061.phpt @@ -5,15 +5,15 @@ local infile handler 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); ?> diff --git a/ext/mysqli/tests/065.phpt b/ext/mysqli/tests/065.phpt index 2733cdafb0273..9b18d33459fea 100644 --- a/ext/mysqli/tests/065.phpt +++ b/ext/mysqli/tests/065.phpt @@ -6,7 +6,7 @@ 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-- diff --git a/ext/mysqli/tests/066.phpt b/ext/mysqli/tests/066.phpt index 678457e93430d..535d01d22434b 100644 --- a/ext/mysqli/tests/066.phpt +++ b/ext/mysqli/tests/066.phpt @@ -37,7 +37,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/067.phpt b/ext/mysqli/tests/067.phpt index 1560f76522bfe..a8874ffef4417 100644 --- a/ext/mysqli/tests/067.phpt +++ b/ext/mysqli/tests/067.phpt @@ -2,19 +2,19 @@ function test: nested selects (cursors) --SKIPIF-- --FILE-- diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index 60ed3f8d1ad83..9157a13b9ab32 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -54,7 +54,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/bug35103.phpt b/ext/mysqli/tests/bug35103.phpt index 7a990eacbf648..95f65320f9e03 100644 --- a/ext/mysqli/tests/bug35103.phpt +++ b/ext/mysqli/tests/bug35103.phpt @@ -58,7 +58,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/bug35517.phpt b/ext/mysqli/tests/bug35517.phpt index a722179896813..578f905f352c7 100644 --- a/ext/mysqli/tests/bug35517.phpt +++ b/ext/mysqli/tests/bug35517.phpt @@ -41,7 +41,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/bug36949.phpt b/ext/mysqli/tests/bug36949.phpt index 5805a6510004d..7033eef23cc9e 100644 --- a/ext/mysqli/tests/bug36949.phpt +++ b/ext/mysqli/tests/bug36949.phpt @@ -54,7 +54,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/bug37090.phpt b/ext/mysqli/tests/bug37090.phpt index 13d939608d522..8345b4b82f881 100644 --- a/ext/mysqli/tests/bug37090.phpt +++ b/ext/mysqli/tests/bug37090.phpt @@ -5,7 +5,7 @@ Bug #37090 (mysqli_set_charset return code) 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-- diff --git a/ext/mysqli/tests/bug42548.phpt b/ext/mysqli/tests/bug42548.phpt index 6f4de58a6673a..e188d83666c1a 100644 --- a/ext/mysqli/tests/bug42548.phpt +++ b/ext/mysqli/tests/bug42548.phpt @@ -6,10 +6,10 @@ 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 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-- diff --git a/ext/mysqli/tests/bug44897.phpt b/ext/mysqli/tests/bug44897.phpt index ba7d0ca49d938..430a32856e1b2 100644 --- a/ext/mysqli/tests/bug44897.phpt +++ b/ext/mysqli/tests/bug44897.phpt @@ -5,16 +5,16 @@ Bug #44879 (failed to prepare statement) 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-- @@ -78,7 +78,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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"); diff --git a/ext/mysqli/tests/bug45289.phpt b/ext/mysqli/tests/bug45289.phpt index 65b7ebd707c71..8604fc72609c7 100644 --- a/ext/mysqli/tests/bug45289.phpt +++ b/ext/mysqli/tests/bug45289.phpt @@ -34,7 +34,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- [004] [%s diff --git a/ext/mysqli/tests/bug46614.phpt b/ext/mysqli/tests/bug46614.phpt index 2cdefbf4a316b..e451abda9ed90 100644 --- a/ext/mysqli/tests/bug46614.phpt +++ b/ext/mysqli/tests/bug46614.phpt @@ -5,7 +5,7 @@ Bug #46614 (Extended MySQLi class gives incorrect empty() result) require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); if (!defined("MYSQLI_ASYNC")) { - die("skip mysqlnd only"); + die("skip mysqlnd only"); } ?> --FILE-- diff --git a/ext/mysqli/tests/bug47050.phpt b/ext/mysqli/tests/bug47050.phpt index ac305b07d2524..1dd8f73a699ef 100644 --- a/ext/mysqli/tests/bug47050.phpt +++ b/ext/mysqli/tests/bug47050.phpt @@ -5,7 +5,7 @@ Bug #47050 (mysqli_poll() modifies improper variables) require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); if (!defined("MYSQLI_ASYNC")) { - die("skip mysqlnd only"); + die("skip mysqlnd only"); } ?> --FILE-- diff --git a/ext/mysqli/tests/bug48909.phpt b/ext/mysqli/tests/bug48909.phpt index 3c7e09f17e389..2d994f559e5e7 100644 --- a/ext/mysqli/tests/bug48909.phpt +++ b/ext/mysqli/tests/bug48909.phpt @@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done diff --git a/ext/mysqli/tests/bug49027.phpt b/ext/mysqli/tests/bug49027.phpt index 4aa546cd2630e..6a459ed4acb37 100644 --- a/ext/mysqli/tests/bug49027.phpt +++ b/ext/mysqli/tests/bug49027.phpt @@ -48,7 +48,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- array(1) { diff --git a/ext/mysqli/tests/bug49442.phpt b/ext/mysqli/tests/bug49442.phpt index 22ff7552b7eba..13ddf7b72154d 100644 --- a/ext/mysqli/tests/bug49442.phpt +++ b/ext/mysqli/tests/bug49442.phpt @@ -7,12 +7,12 @@ require_once('skipifconnectfailure.inc'); $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); ?> diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt index ecae650c1ba28..8cc15e325e1ea 100644 --- a/ext/mysqli/tests/bug51647.phpt +++ b/ext/mysqli/tests/bug51647.phpt @@ -10,33 +10,33 @@ if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) 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(); ?> diff --git a/ext/mysqli/tests/bug52891.phpt b/ext/mysqli/tests/bug52891.phpt index f0692556399f6..2c4e19ca4c21b 100644 --- a/ext/mysqli/tests/bug52891.phpt +++ b/ext/mysqli/tests/bug52891.phpt @@ -5,7 +5,7 @@ Bug #52891 (Wrong data inserted with mysqli/mysqlnd when using bind_param,value 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-- @@ -100,16 +100,16 @@ if (!$IS_MYSQLND) { 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); diff --git a/ext/mysqli/tests/bug53503.phpt b/ext/mysqli/tests/bug53503.phpt index b71afe28c7e3c..0b187102f7550 100644 --- a/ext/mysqli/tests/bug53503.phpt +++ b/ext/mysqli/tests/bug53503.phpt @@ -6,11 +6,11 @@ require_once('skipif.inc'); 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); diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt index 023b9f424d022..379cab0db31f8 100644 --- a/ext/mysqli/tests/bug55283.phpt +++ b/ext/mysqli/tests/bug55283.phpt @@ -10,33 +10,33 @@ if (!defined('MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT')) 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(); ?> diff --git a/ext/mysqli/tests/bug66043.phpt b/ext/mysqli/tests/bug66043.phpt index 07714f217a5d2..6b479a45ed01b 100644 --- a/ext/mysqli/tests/bug66043.phpt +++ b/ext/mysqli/tests/bug66043.phpt @@ -3,10 +3,6 @@ Bug #66043 (Segfault calling bind_param() on mysqli) --SKIPIF-- --FILE-- @@ -16,11 +12,34 @@ if (!$db = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); } +if (!$db->query("DROP TABLE IF EXISTS test")) { + printf("[002] [%d] %s\n", mysqli_errno($db), mysqli_error($db)); + die(); +} + +if (!$db->query("CREATE TABLE test(str TEXT)")) { + printf("[003] [%d] %s\n", mysqli_errno($db), mysqli_error($db)); + die(); +} + +if (!$db->query("INSERT INTO test(str) VALUES ('Test')")) { + printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + die(); +} + $stmt = $db->stmt_init(); -$stmt->prepare("SELECT User FROM user WHERE password=\"\""); +if (!$stmt->prepare("SELECT str FROM test")) { + printf("[004] [%d] %s\n", mysqli_errno($db), mysqli_error($db)); + die(); +} + $stmt->execute(); $stmt->bind_result($testArg); echo "Okey"; ?> +--CLEAN-- + --EXPECT-- Okey diff --git a/ext/mysqli/tests/bug67839.phpt b/ext/mysqli/tests/bug67839.phpt index b4e92d839f03d..4391d74add2ef 100644 --- a/ext/mysqli/tests/bug67839.phpt +++ b/ext/mysqli/tests/bug67839.phpt @@ -2,8 +2,8 @@ mysqli_float_handling - ensure 4 byte float is handled correctly --SKIPIF-- --INI-- precision=5 diff --git a/ext/mysqli/tests/bug68077.phpt b/ext/mysqli/tests/bug68077.phpt index 8e5ccfb410e65..2be4fe97aa84a 100644 --- a/ext/mysqli/tests/bug68077.phpt +++ b/ext/mysqli/tests/bug68077.phpt @@ -5,14 +5,14 @@ Bug #68077 (LOAD DATA LOCAL INFILE / open_basedir restriction) 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); ?> diff --git a/ext/mysqli/tests/bug69899.phpt b/ext/mysqli/tests/bug69899.phpt index da69e3c629f04..13c0c953818d5 100644 --- a/ext/mysqli/tests/bug69899.phpt +++ b/ext/mysqli/tests/bug69899.phpt @@ -12,7 +12,7 @@ require_once __DIR__ . '/skipif.inc'; require_once __DIR__ . '/skipifconnectfailure.inc'; require_once __DIR__ . '/connect.inc'; if (!$IS_MYSQLND) { - die('skip mysqlnd only'); + die('skip mysqlnd only'); } ?> --FILE-- diff --git a/ext/mysqli/tests/bug70384.phpt b/ext/mysqli/tests/bug70384.phpt index 5489905a0a67b..1bc0e7a97f76d 100644 --- a/ext/mysqli/tests/bug70384.phpt +++ b/ext/mysqli/tests/bug70384.phpt @@ -2,19 +2,19 @@ mysqli_float_handling - ensure 4 byte float is handled correctly --SKIPIF-- 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-- --CLEAN-- --EXPECT-- OK diff --git a/ext/mysqli/tests/bug70949.phpt b/ext/mysqli/tests/bug70949.phpt index b9ad29b6b82ef..24c729c670ae4 100644 --- a/ext/mysqli/tests/bug70949.phpt +++ b/ext/mysqli/tests/bug70949.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once("connect.inc"); if (!$IS_MYSQLND) { - die("skip mysqlnd only test"); + die("skip mysqlnd only test"); } ?> --FILE-- @@ -51,7 +51,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/bug71863.phpt b/ext/mysqli/tests/bug71863.phpt index 18465e996b92b..1490f9fe9691f 100644 --- a/ext/mysqli/tests/bug71863.phpt +++ b/ext/mysqli/tests/bug71863.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once("connect.inc"); if (!$IS_MYSQLND) { - die("skip mysqlnd only test"); + die("skip mysqlnd only test"); } ?> --FILE-- diff --git a/ext/mysqli/tests/bug72701.phpt b/ext/mysqli/tests/bug72701.phpt index 2145de9b48da1..b2944f02039d7 100644 --- a/ext/mysqli/tests/bug72701.phpt +++ b/ext/mysqli/tests/bug72701.phpt @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc'); 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"); } ?> diff --git a/ext/mysqli/tests/bug73800.phpt b/ext/mysqli/tests/bug73800.phpt index af601c6e60364..af3a5c8cfb4e3 100644 --- a/ext/mysqli/tests/bug73800.phpt +++ b/ext/mysqli/tests/bug73800.phpt @@ -5,6 +5,7 @@ Bug #73800 (sporadic segfault with MYSQLI_OPT_INT_AND_FLOAT_NATIVE) require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); if (PHP_INT_SIZE != 8) die('skip requires 64-bit'); +if (!defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) die('skip requires mysqlnd'); ?> --FILE-- = 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); ?> diff --git a/ext/mysqli/tests/bug77597.phpt b/ext/mysqli/tests/bug77597.phpt index ef3cb0f952acb..52ae874454d55 100644 --- a/ext/mysqli/tests/bug77597.phpt +++ b/ext/mysqli/tests/bug77597.phpt @@ -4,6 +4,7 @@ Bug #77597: mysqli_fetch_field hangs scripts --FILE-- errno, $link->error)); + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); ?> --INI-- diff --git a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt index 9c94aa6dfb97e..d2894f2c0d416 100644 --- a/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt +++ b/ext/mysqli/tests/gracefull_fail_on_empty_result_set.phpt @@ -3,7 +3,6 @@ Fail gracefully on empty result set --SKIPIF-- --FILE-- @@ -26,7 +25,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- bool(false) diff --git a/ext/mysqli/tests/mysqli_affected_rows.phpt b/ext/mysqli/tests/mysqli_affected_rows.phpt index b3f6580baea01..3205e7cb2b8e2 100644 --- a/ext/mysqli/tests/mysqli_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows.phpt @@ -2,8 +2,8 @@ mysqli_affected_rows() --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt index 384ecd5e62d03..5e2e0bba8a09e 100644 --- a/ext/mysqli/tests/mysqli_affected_rows_oo.phpt +++ b/ext/mysqli/tests/mysqli_affected_rows_oo.phpt @@ -2,8 +2,8 @@ mysqli->affected_rows --SKIPIF-- --FILE-- affected_rows ?> --CLEAN-- --EXPECT-- Property access is not allowed yet diff --git a/ext/mysqli/tests/mysqli_auth_pam.phpt b/ext/mysqli/tests/mysqli_auth_pam.phpt index a20851a4db7f9..7d23ee5782571 100644 --- a/ext/mysqli/tests/mysqli_auth_pam.phpt +++ b/ext/mysqli/tests/mysqli_auth_pam.phpt @@ -6,22 +6,22 @@ require_once('skipif.inc'); 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(); @@ -33,22 +33,22 @@ mysqli_query($link, 'DROP USER pamtest'); 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-- diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt index af3142ea44ad2..9bfec89b27095 100644 --- a/ext/mysqli/tests/mysqli_autocommit.phpt +++ b/ext/mysqli/tests/mysqli_autocommit.phpt @@ -2,17 +2,17 @@ mysqli_autocommit() --SKIPIF-- errno, $link->error)); + if (!have_innodb($link)) + die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index 13e8fb0744c54..1030bedbb3777 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -2,18 +2,18 @@ mysqli->autocommit() --SKIPIF-- 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-- autocommit() ?> --CLEAN-- --EXPECT-- my_mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_begin_transaction.phpt b/ext/mysqli/tests/mysqli_begin_transaction.phpt index e4c87ed9db75a..fa8d88908cc4b 100644 --- a/ext/mysqli/tests/mysqli_begin_transaction.phpt +++ b/ext/mysqli/tests/mysqli_begin_transaction.phpt @@ -7,10 +7,10 @@ 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-- --CLEAN-- --EXPECT-- NULL diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt index 8fe529236b54b..383a7a1cf869b 100644 --- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc'); 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-- @@ -58,7 +58,7 @@ if (!$IS_MYSQLND) { ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt index c6bc2e9ee9561..70c119b554c25 100644 --- a/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt +++ b/ext/mysqli/tests/mysqli_change_user_locks_temporary.phpt @@ -100,7 +100,7 @@ die("skip - is the server still buggy?"); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_new.phpt b/ext/mysqli/tests/mysqli_change_user_new.phpt index a9744ce98044c..bff89fb8ddd96 100644 --- a/ext/mysqli/tests/mysqli_change_user_new.phpt +++ b/ext/mysqli/tests/mysqli_change_user_new.phpt @@ -6,11 +6,11 @@ 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 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-- = 50600) - die("SKIP For MySQL < 5.6.0"); + die("SKIP For MySQL < 5.6.0"); ?> --FILE-- 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-- errno, $link->error)); + die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_change_user_set_names.phpt b/ext/mysqli/tests/mysqli_change_user_set_names.phpt index 2a1d726fb4c98..f818dea7dab98 100644 --- a/ext/mysqli/tests/mysqli_change_user_set_names.phpt +++ b/ext/mysqli/tests/mysqli_change_user_set_names.phpt @@ -6,19 +6,19 @@ require_once('skipif.inc'); 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-- --FILE-- @@ -100,7 +100,7 @@ if (!function_exists('mysqli_set_charset')) { ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt index fc5253a8074c9..2a61af45edb67 100644 --- a/ext/mysqli/tests/mysqli_character_set_name_oo.phpt +++ b/ext/mysqli/tests/mysqli_character_set_name_oo.phpt @@ -2,8 +2,8 @@ mysqli_chararcter_set_name(), mysql_client_encoding() [alias] --SKIPIF-- --FILE-- client_version = '80000'/integer +mysqli->client_version = '%d'/integer mysqli object is already closed mysqli object is already closed mysqli object is already closed @@ -366,7 +366,7 @@ Magic, magic properties: mysqli object is already closed Property access is not allowed yet Property access is not allowed yet -mysqli->client_version = '80000'/integer +mysqli->client_version = '%d'/integer mysqli object is already closed mysqli object is already closed mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt index 40666a65bede5..393e06ebaad2b 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt @@ -2,8 +2,8 @@ Interface of the class mysqli_stmt --SKIPIF-- --FILE-- --FILE-- --CLEAN-- --EXPECTF-- Warning: Wrong parameter count for mysqli_warning::mysqli_warning() in %s on line %d diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt index a85b96229864b..273412de0bb4f 100644 --- a/ext/mysqli/tests/mysqli_commit.phpt +++ b/ext/mysqli/tests/mysqli_commit.phpt @@ -7,10 +7,10 @@ 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-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index e2b8a25fd33ca..6377fdf5a91c8 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -7,10 +7,10 @@ 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-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_connect_attr.phpt b/ext/mysqli/tests/mysqli_connect_attr.phpt index 694dc72dab548..7d586a694d9aa 100644 --- a/ext/mysqli/tests/mysqli_connect_attr.phpt +++ b/ext/mysqli/tests/mysqli_connect_attr.phpt @@ -6,10 +6,10 @@ 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 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';")) diff --git a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt index 8b5886bba28cf..9387dd2c48942 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt @@ -2,12 +2,12 @@ new mysqli() --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli_data_seek(): Argument #2 ($offset) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_data_seek_oo.phpt b/ext/mysqli/tests/mysqli_data_seek_oo.phpt index 1a60d64a98333..d1939bafa2858 100644 --- a/ext/mysqli/tests/mysqli_data_seek_oo.phpt +++ b/ext/mysqli/tests/mysqli_data_seek_oo.phpt @@ -72,7 +72,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; --CLEAN-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_debug.phpt b/ext/mysqli/tests/mysqli_debug.phpt index 14c95c2de35be..1646dd9f3aa3a 100644 --- a/ext/mysqli/tests/mysqli_debug.phpt +++ b/ext/mysqli/tests/mysqli_debug.phpt @@ -6,13 +6,13 @@ require_once('skipif.inc'); 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-- --CLEAN-- --EXPECTF-- done%s diff --git a/ext/mysqli/tests/mysqli_debug_append.phpt b/ext/mysqli/tests/mysqli_debug_append.phpt index b246fed9e25b8..65496fdf6e99c 100644 --- a/ext/mysqli/tests/mysqli_debug_append.phpt +++ b/ext/mysqli/tests/mysqli_debug_append.phpt @@ -6,16 +6,16 @@ require_once('skipif.inc'); 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"); ?> @@ -88,7 +88,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test is not for Windows platfo ?> --CLEAN-- --EXPECTF-- done%s diff --git a/ext/mysqli/tests/mysqli_debug_control_string.phpt b/ext/mysqli/tests/mysqli_debug_control_string.phpt index 7a59c7b4e00f0..bd17e138795af 100644 --- a/ext/mysqli/tests/mysqli_debug_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_control_string.phpt @@ -6,16 +6,16 @@ require_once('skipif.inc'); 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-- --INI-- diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt index 5e2be2ac5dea4..54026193169ba 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt @@ -6,16 +6,16 @@ require_once('skipif.inc'); 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-- --CLEAN-- --EXPECTF-- [083][control string 'n:O,%smysqli_debug_phpt.trace'] Trace file has not been written. diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt index a99df69359116..0d963d2370188 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_only.phpt @@ -7,16 +7,16 @@ require_once('skipifconnectfailure.inc'); 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-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt b/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt index fe51b6141d8d6..54edb67a07355 100644 --- a/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt +++ b/ext/mysqli/tests/mysqli_disable_reads_from_master.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); 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-- @@ -39,7 +39,7 @@ if (!function_exists('mysqli_disable_reads_from_master')) { ?> --CLEAN-- --EXPECTF-- Warning: mysqli_disable_reads_from_master(): mysqli object is already closed in %s on line %d diff --git a/ext/mysqli/tests/mysqli_driver_unclonable.phpt b/ext/mysqli/tests/mysqli_driver_unclonable.phpt index 98559f46fc2be..c51d5d5245b30 100644 --- a/ext/mysqli/tests/mysqli_driver_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_driver_unclonable.phpt @@ -2,7 +2,6 @@ Trying to clone mysqli_driver object --SKIPIF-- - --FILE-- --FILE-- diff --git a/ext/mysqli/tests/mysqli_expire_password.phpt b/ext/mysqli/tests/mysqli_expire_password.phpt index 788a3571c5e28..b11856d60dfca 100644 --- a/ext/mysqli/tests/mysqli_expire_password.phpt +++ b/ext/mysqli/tests/mysqli_expire_password.phpt @@ -6,45 +6,45 @@ require_once('skipif.inc'); 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-- @@ -117,9 +117,9 @@ if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO expiretest@'% ?> --CLEAN-- --EXPECTF-- Warning: mysqli%sconnect(): (HY000/1862): %s in %s on line %d diff --git a/ext/mysqli/tests/mysqli_explain_metadata.phpt b/ext/mysqli/tests/mysqli_explain_metadata.phpt index 45a567dd9f0c2..ade3e93fa7ba4 100644 --- a/ext/mysqli/tests/mysqli_explain_metadata.phpt +++ b/ext/mysqli/tests/mysqli_explain_metadata.phpt @@ -156,7 +156,7 @@ if (!$IS_MYSQLND) ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt index 7c962790c6f86..ae99c2ca87571 100644 --- a/ext/mysqli/tests/mysqli_fetch_all.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all.phpt @@ -5,7 +5,7 @@ mysqli_fetch_all() 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-- --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index ff56ad1a9e98a..358dc2ae8b1aa 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECTF-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt index defa5a541efe3..cbb3367dd0a1e 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_assoc.phpt @@ -28,7 +28,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [002] diff --git a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt index 33330074df11b..d3e8c138b0ced 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_many_rows.phpt @@ -108,7 +108,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index e4e39b9dc7601..6bf2b0f4c02df 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -278,7 +278,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_assoc.phpt b/ext/mysqli/tests/mysqli_fetch_assoc.phpt index 62f2bf05e4662..de19f9a878ae6 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc.phpt @@ -62,7 +62,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [005] diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt index cc60a01b83a66..d59cd82128e02 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_bit.phpt @@ -2,14 +2,14 @@ mysqli_fetch_assoc() - BIT --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt index d74fb4827010d..225a5c03d82e5 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_no_alias_utf8.phpt @@ -2,35 +2,35 @@ mysqli_fetch_assoc() - utf8 --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt index b6968ccbaead6..6d53211697d46 100644 --- a/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_fetch_assoc_zerofill.phpt @@ -71,7 +71,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_field.phpt b/ext/mysqli/tests/mysqli_fetch_field.phpt index f70f422534aad..2018d75755051 100644 --- a/ext/mysqli/tests/mysqli_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field.phpt @@ -78,7 +78,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt index b8544d87f40bf..4a4d240be3721 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct.phpt @@ -41,7 +41,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_fetch_field_direct(): Argument #2 ($offset) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt index 9c7992570184f..1f94eefd388d5 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_direct_oo.phpt @@ -53,7 +53,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt index 14ca304aa42b8..7dff325623ddb 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_flags.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_flags.phpt @@ -7,10 +7,10 @@ require_once('skipifconnectfailure.inc'); 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); ?> @@ -219,7 +219,7 @@ mysqli_close($link); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt index c5aa09c10927a..d655e05a9c1da 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_oo.phpt @@ -66,7 +66,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt index 074d9ccd1c0d7..dcfbbaaace4b0 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt @@ -109,7 +109,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_fetch_fields.phpt b/ext/mysqli/tests/mysqli_fetch_fields.phpt index 114029ac101ca..7cfad35f87389 100644 --- a/ext/mysqli/tests/mysqli_fetch_fields.phpt +++ b/ext/mysqli/tests/mysqli_fetch_fields.phpt @@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_fetch_lengths.phpt b/ext/mysqli/tests/mysqli_fetch_lengths.phpt index 371b300b17110..a1e4f50dbdfb9 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths.phpt @@ -37,7 +37,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- bool(false) diff --git a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt index 1de60e0363061..6c117afc59371 100644 --- a/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_lengths_oo.phpt @@ -33,10 +33,10 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- NULL diff --git a/ext/mysqli/tests/mysqli_fetch_object.phpt b/ext/mysqli/tests/mysqli_fetch_object.phpt index 443b2663c7447..a234aee4c8a5c 100644 --- a/ext/mysqli/tests/mysqli_fetch_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object.phpt @@ -139,7 +139,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- Exception: Too few arguments to function mysqli_fetch_object_construct::__construct(), 0 passed and exactly 2 expected diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt index 9aac03195ba01..979c523199716 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_constructor.phpt @@ -45,7 +45,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- No exception with PHP: diff --git a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt index 75e62fd9406f8..5a89d6d3f1253 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_no_object.phpt @@ -19,7 +19,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- %s(6) "object" diff --git a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt index 674c68a4fd806..b00c485950004 100644 --- a/ext/mysqli/tests/mysqli_fetch_object_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_object_oo.phpt @@ -128,7 +128,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_fetch_row.phpt b/ext/mysqli/tests/mysqli_fetch_row.phpt index a1a891d7029e6..09ae78aba6b1d 100644 --- a/ext/mysqli/tests/mysqli_fetch_row.phpt +++ b/ext/mysqli/tests/mysqli_fetch_row.phpt @@ -33,7 +33,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [004] diff --git a/ext/mysqli/tests/mysqli_field_count.phpt b/ext/mysqli/tests/mysqli_field_count.phpt index 26d1b8b1089f4..ca40616547a34 100644 --- a/ext/mysqli/tests/mysqli_field_count.phpt +++ b/ext/mysqli/tests/mysqli_field_count.phpt @@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc'); print "done!"; --CLEAN-- --EXPECT-- int(0) diff --git a/ext/mysqli/tests/mysqli_field_seek.phpt b/ext/mysqli/tests/mysqli_field_seek.phpt index 1f5a6ee8fba74..0a0b02273efc8 100644 --- a/ext/mysqli/tests/mysqli_field_seek.phpt +++ b/ext/mysqli/tests/mysqli_field_seek.phpt @@ -119,7 +119,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_field_seek(): Argument #2 ($field_nr) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_field_tell.phpt b/ext/mysqli/tests/mysqli_field_tell.phpt index 3575d17d8b5a5..79cfc04885191 100644 --- a/ext/mysqli/tests/mysqli_field_tell.phpt +++ b/ext/mysqli/tests/mysqli_field_tell.phpt @@ -53,7 +53,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- int(0) diff --git a/ext/mysqli/tests/mysqli_fork.phpt b/ext/mysqli/tests/mysqli_fork.phpt index 594e30178e969..ca5eb6230facf 100644 --- a/ext/mysqli/tests/mysqli_fork.phpt +++ b/ext/mysqli/tests/mysqli_fork.phpt @@ -6,17 +6,17 @@ require_once('skipif.inc'); 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-- diff --git a/ext/mysqli/tests/mysqli_free_result.phpt b/ext/mysqli/tests/mysqli_free_result.phpt index 3956021615084..8f81fffab4d57 100644 --- a/ext/mysqli/tests/mysqli_free_result.phpt +++ b/ext/mysqli/tests/mysqli_free_result.phpt @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- a diff --git a/ext/mysqli/tests/mysqli_get_charset.phpt b/ext/mysqli/tests/mysqli_get_charset.phpt index 88aa0e471d3b9..68ee608028e5a 100644 --- a/ext/mysqli/tests/mysqli_get_charset.phpt +++ b/ext/mysqli/tests/mysqli_get_charset.phpt @@ -5,7 +5,7 @@ mysqli_get_charset() 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-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt index 9ef1cc444898c..78f3d05b39c27 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt @@ -5,7 +5,7 @@ mysqli_get_client_stats() 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-- diff --git a/ext/mysqli/tests/mysqli_get_client_stats_implicit_free.phpt b/ext/mysqli/tests/mysqli_get_client_stats_implicit_free.phpt index ec4ebe7cfbc6e..92a779b31f483 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_implicit_free.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_implicit_free.phpt @@ -5,7 +5,7 @@ mysqli_get_client_stats() - implicit_free_result 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-- diff --git a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt index 6cd49a2c1514b..e648d6695d6a6 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt @@ -5,7 +5,7 @@ mysqli_get_client_stats() - php_ini setting 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-- diff --git a/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt b/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt index c9107115d3ead..ce7a5e3267a13 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_ps.phpt @@ -5,7 +5,7 @@ mysqli_get_client_stats() - PS 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-- diff --git a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt index 0e7f57bab1119..ef1ea86e50d1d 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_skipped.phpt @@ -8,7 +8,7 @@ mysqlnd.collect_memory_statistics="1" 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-- diff --git a/ext/mysqli/tests/mysqli_get_client_version.phpt b/ext/mysqli/tests/mysqli_get_client_version.phpt index 88e1e85e15603..28f4974ba1819 100644 --- a/ext/mysqli/tests/mysqli_get_client_version.phpt +++ b/ext/mysqli/tests/mysqli_get_client_version.phpt @@ -2,7 +2,6 @@ mysqli_get_client_version() --SKIPIF-- - --FILE-- --FILE-- @@ -73,7 +73,7 @@ if (!function_exists('mysqli_get_connection_stats')) { ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt index 8002c045bfa7b..d2b087ce9aa57 100644 --- a/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_connection_stats_off.phpt @@ -8,7 +8,7 @@ mysqlnd.collect_memory_statistics="0" 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-- diff --git a/ext/mysqli/tests/mysqli_get_host_info.phpt b/ext/mysqli/tests/mysqli_get_host_info.phpt index a26daa9ce1ca2..4d9087860fb21 100644 --- a/ext/mysqli/tests/mysqli_get_host_info.phpt +++ b/ext/mysqli/tests/mysqli_get_host_info.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_server_info.phpt b/ext/mysqli/tests/mysqli_get_server_info.phpt index 33e816f2e8a84..88cfd47ee19e8 100644 --- a/ext/mysqli/tests/mysqli_get_server_info.phpt +++ b/ext/mysqli/tests/mysqli_get_server_info.phpt @@ -17,7 +17,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_get_warnings.phpt b/ext/mysqli/tests/mysqli_get_warnings.phpt index 23356db4e6bfe..f81baa4177cca 100644 --- a/ext/mysqli/tests/mysqli_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_get_warnings.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) - die("skip - experimental (= unsupported) feature"); + die("skip - experimental (= unsupported) feature"); ?> --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_insert_id_variation.phpt b/ext/mysqli/tests/mysqli_insert_id_variation.phpt index 16797aa94b370..b3f36d4cb0ccc 100644 --- a/ext/mysqli/tests/mysqli_insert_id_variation.phpt +++ b/ext/mysqli/tests/mysqli_insert_id_variation.phpt @@ -95,7 +95,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt index 69f781f48a10b..105b3276d3bb4 100644 --- a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt +++ b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt @@ -6,14 +6,14 @@ require_once('skipif.inc'); 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); ?> diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt index 563a6ba19c64f..40ca9eaa1af96 100644 --- a/ext/mysqli/tests/mysqli_kill.phpt +++ b/ext/mysqli/tests/mysqli_kill.phpt @@ -77,7 +77,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_kill(): Argument #2 ($connection_id) must be greater than 0 @@ -95,7 +95,7 @@ object(mysqli)#%d (%d) { ["connect_error"]=> NULL ["errno"]=> - int(2006) + int(%d) ["error"]=> string(%d) "%s" ["error_list"]=> @@ -103,7 +103,7 @@ object(mysqli)#%d (%d) { [0]=> array(3) { ["errno"]=> - int(2006) + int(%d) ["sqlstate"]=> string(5) "%s" ["error"]=> diff --git a/ext/mysqli/tests/mysqli_last_insert_id.phpt b/ext/mysqli/tests/mysqli_last_insert_id.phpt index b0c453d08e794..0598f29b740d9 100644 --- a/ext/mysqli/tests/mysqli_last_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_last_insert_id.phpt @@ -176,7 +176,7 @@ API vs. SQL LAST_INSERT_ID() ?> --CLEAN-- --EXPECTF-- API: %d, SQL: %d diff --git a/ext/mysqli/tests/mysqli_more_results.phpt b/ext/mysqli/tests/mysqli_more_results.phpt index 36a477fcf3de6..aaa4f65f28856 100644 --- a/ext/mysqli/tests/mysqli_more_results.phpt +++ b/ext/mysqli/tests/mysqli_more_results.phpt @@ -59,7 +59,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [004] diff --git a/ext/mysqli/tests/mysqli_multi_query.phpt b/ext/mysqli/tests/mysqli_multi_query.phpt index 843298140ba70..0cc260a557935 100644 --- a/ext/mysqli/tests/mysqli_multi_query.phpt +++ b/ext/mysqli/tests/mysqli_multi_query.phpt @@ -111,7 +111,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- [006] 3 diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt index 159d7d9853d42..ec424e44bda98 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout.phpt @@ -6,8 +6,8 @@ require_once('skipif.inc'); 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 diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt index 403662829a711..a4459992d887d 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt @@ -6,14 +6,14 @@ 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(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-- diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt index 011df0e7628af..5ba35270281c5 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt @@ -6,14 +6,14 @@ 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(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-- diff --git a/ext/mysqli/tests/mysqli_next_result.phpt b/ext/mysqli/tests/mysqli_next_result.phpt index 62b743014f3d0..425260b92657d 100644 --- a/ext/mysqli/tests/mysqli_next_result.phpt +++ b/ext/mysqli/tests/mysqli_next_result.phpt @@ -64,7 +64,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_num_fields.phpt b/ext/mysqli/tests/mysqli_num_fields.phpt index e1d61cf7853d4..083ccef4bfb90 100644 --- a/ext/mysqli/tests/mysqli_num_fields.phpt +++ b/ext/mysqli/tests/mysqli_num_fields.phpt @@ -43,7 +43,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_num_rows.phpt b/ext/mysqli/tests/mysqli_num_rows.phpt index 04a5dec59aadc..f617757d37820 100644 --- a/ext/mysqli/tests/mysqli_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_num_rows.phpt @@ -71,7 +71,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_result object is already closed diff --git a/ext/mysqli/tests/mysqli_options_init_command.phpt b/ext/mysqli/tests/mysqli_options_init_command.phpt index 089f230538d01..2b87083cbd483 100644 --- a/ext/mysqli/tests/mysqli_options_init_command.phpt +++ b/ext/mysqli/tests/mysqli_options_init_command.phpt @@ -5,7 +5,6 @@ mysqli_options() require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ?> - --FILE-- --CLEAN-- --EXPECTF-- Warning: mysqli_real_connect(): (%s/%d): %s in %s on line %d diff --git a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt index 91bd38553c24c..0b7f8df703fae 100644 --- a/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt +++ b/ext/mysqli/tests/mysqli_options_int_and_float_native.phpt @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$IS_MYSQLND) - die("skip mysqlnd only test"); + die("skip mysqlnd only test"); ?> --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_pam_sha256.phpt b/ext/mysqli/tests/mysqli_pam_sha256.phpt index 5d9591e0dc4eb..8866409efeb5f 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256.phpt @@ -10,43 +10,43 @@ phpinfo(INFO_MODULES); $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'); @@ -54,24 +54,24 @@ $link->query("DROP USER shatest@localhost"); 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(); @@ -104,9 +104,9 @@ $link->close(); ?> --CLEAN-- 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! diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt index 7799effe229e0..86e27fbaff7d9 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_ini.phpt @@ -10,56 +10,56 @@ phpinfo(INFO_MODULES); $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'); @@ -67,24 +67,24 @@ $link->query("DROP USER shatest@localhost"); 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(); diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt index e6c65bef9d2b2..9b5639ff9a7ad 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option.phpt @@ -10,53 +10,53 @@ phpinfo(INFO_MODULES); $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'); @@ -64,24 +64,24 @@ $link->query("DROP USER shatest@localhost"); 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(); @@ -121,11 +121,11 @@ $link->close(); ?> --CLEAN-- 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! diff --git a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt index 2397c82cac9cd..b664179265fdd 100644 --- a/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt +++ b/ext/mysqli/tests/mysqli_pam_sha256_public_key_option_invalid.phpt @@ -10,53 +10,53 @@ phpinfo(INFO_MODULES); $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'); @@ -64,24 +64,24 @@ $link->query("DROP USER shatest@localhost"); 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(); @@ -165,13 +165,13 @@ $link->close(); ?> --CLEAN-- 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 diff --git a/ext/mysqli/tests/mysqli_pconn_max_links.phpt b/ext/mysqli/tests/mysqli_pconn_max_links.phpt index f6ee6aa5a07aa..f48222c425336 100644 --- a/ext/mysqli/tests/mysqli_pconn_max_links.phpt +++ b/ext/mysqli/tests/mysqli_pconn_max_links.phpt @@ -2,41 +2,41 @@ Persistent connections and mysqli.max_links --SKIPIF-- --INI-- mysqli.allow_persistent=1 diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index d5527fcf02c06..c786a8166b305 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -7,7 +7,7 @@ require_once('connect.inc'); 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-- --FILE-- --FILE-- --FILE-- diff --git a/ext/mysqli/tests/mysqli_prepare.phpt b/ext/mysqli/tests/mysqli_prepare.phpt index 16d208efcca8b..f6676396e53a1 100644 --- a/ext/mysqli/tests/mysqli_prepare.phpt +++ b/ext/mysqli/tests/mysqli_prepare.phpt @@ -106,10 +106,10 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/mysqli_query.phpt b/ext/mysqli/tests/mysqli_query.phpt index b3269689c1b19..90fc24cf9c852 100644 --- a/ext/mysqli/tests/mysqli_query.phpt +++ b/ext/mysqli/tests/mysqli_query.phpt @@ -107,7 +107,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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'); diff --git a/ext/mysqli/tests/mysqli_query_iterators.phpt b/ext/mysqli/tests/mysqli_query_iterators.phpt index cb567affc2878..3ad35363b9c40 100644 --- a/ext/mysqli/tests/mysqli_query_iterators.phpt +++ b/ext/mysqli/tests/mysqli_query_iterators.phpt @@ -69,7 +69,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- --- Testing default --- diff --git a/ext/mysqli/tests/mysqli_query_stored_proc.phpt b/ext/mysqli/tests/mysqli_query_stored_proc.phpt index 4a77ac91c8ef3..566dc9dc27239 100644 --- a/ext/mysqli/tests/mysqli_query_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_query_stored_proc.phpt @@ -6,10 +6,10 @@ 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 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-- @@ -157,7 +157,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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"); diff --git a/ext/mysqli/tests/mysqli_query_unicode.phpt b/ext/mysqli/tests/mysqli_query_unicode.phpt index 6959346107bde..b62418508f106 100644 --- a/ext/mysqli/tests/mysqli_query_unicode.phpt +++ b/ext/mysqli/tests/mysqli_query_unicode.phpt @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc'); 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); ?> diff --git a/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt b/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt new file mode 100644 index 0000000000000..0a9fa583d134d --- /dev/null +++ b/ext/mysqli/tests/mysqli_real_connect_compression_error.phpt @@ -0,0 +1,56 @@ +--TEST-- +Bug #80107 mysqli_query() fails for ~16 MB long query when compression is enabled +--SKIPIF-- +query("SHOW VARIABLES LIKE 'max_allowed_packet'"); +if ($result->fetch_assoc()['Value'] < 0xffffff) { + die('skip max_allowed_packet is less than 0xffffff'); +} +?> +--FILE-- +query("DROP TABLE IF EXISTS test"); +$mysqli->query("CREATE TABLE test (`blob` LONGBLOB NOT NULL) ENGINE=MyISAM"); + +$data = str_repeat("x", $data_size); +$mysqli->query("INSERT INTO $db.test(`blob`) VALUE ('$data')"); + +var_dump(mysqli_error_list($mysqli)); +$mysqli->close(); + +// Insert with compression enabled: + +$mysqli = mysqli_init(); +$result = my_mysqli_real_connect($mysqli, $host, $user, $passwd, $db, $port, $socket, MYSQLI_CLIENT_COMPRESS); + +$data = str_repeat("x", $data_size); +$mysqli->query("INSERT INTO $db.test(`blob`) VALUE ('$data')"); + +var_dump(mysqli_error_list($mysqli)); +$mysqli->close(); + +?> +--CLEAN-- + +--EXPECT-- +array(0) { +} +array(0) { +} diff --git a/ext/mysqli/tests/mysqli_real_connect_pconn.phpt b/ext/mysqli/tests/mysqli_real_connect_pconn.phpt index a7245e384e1ce..d49c01d3b7aef 100644 --- a/ext/mysqli/tests/mysqli_real_connect_pconn.phpt +++ b/ext/mysqli/tests/mysqli_real_connect_pconn.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); 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 diff --git a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt index e6b60997c9a03..2dec713db2bb9 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt @@ -8,11 +8,11 @@ require_once('skipifconnectfailure.inc'); 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-- @@ -71,7 +71,7 @@ mysqli_error($link)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt index 34c4faa98a87d..9af4ade589442 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt @@ -8,11 +8,11 @@ require_once('skipifconnectfailure.inc'); 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-- @@ -64,7 +64,7 @@ mysqli_error($link)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt index c9482cc6e1ed9..c79302d4027b8 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt @@ -8,11 +8,11 @@ require_once('skipifconnectfailure.inc'); 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-- @@ -63,7 +63,7 @@ mysqli_error($link)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt index d85649757e8d5..d84944b4bd21b 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt @@ -8,11 +8,11 @@ require_once('skipifconnectfailure.inc'); 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-- @@ -64,7 +64,7 @@ mysqli_error($link)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt index 2f08d5c37fac8..4da0d8a232914 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt @@ -7,11 +7,11 @@ require_once('skipifconnectfailure.inc'); 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); ?> @@ -64,7 +64,7 @@ mysqli_error($link)); ?> --CLEAN-- --EXPECT-- bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt b/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt index c577215357e31..034a3bd607bab 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_sjis.phpt @@ -7,11 +7,11 @@ require_once('skipifconnectfailure.inc'); 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-- diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt index 78a3ece11b15f..4bb5ef79690f5 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt @@ -71,7 +71,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_real_query.phpt b/ext/mysqli/tests/mysqli_real_query.phpt index 45df8a9edcd9c..4b429940d7d0b 100644 --- a/ext/mysqli/tests/mysqli_real_query.phpt +++ b/ext/mysqli/tests/mysqli_real_query.phpt @@ -87,7 +87,7 @@ if (!$link = mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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"); diff --git a/ext/mysqli/tests/mysqli_reap_async_query.phpt b/ext/mysqli/tests/mysqli_reap_async_query.phpt index 223befe9bc8fc..b93996ef38b64 100644 --- a/ext/mysqli/tests/mysqli_reap_async_query.phpt +++ b/ext/mysqli/tests/mysqli_reap_async_query.phpt @@ -7,7 +7,7 @@ require_once('connect.inc'); 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-- --INI-- mysqli.reconnect=1 diff --git a/ext/mysqli/tests/mysqli_release_savepoint.phpt b/ext/mysqli/tests/mysqli_release_savepoint.phpt index cbadb8a95cea0..44c33b39c2283 100644 --- a/ext/mysqli/tests/mysqli_release_savepoint.phpt +++ b/ext/mysqli/tests/mysqli_release_savepoint.phpt @@ -7,10 +7,10 @@ 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-- --CLEAN-- --EXPECT-- mysqli_release_savepoint(): Argument #2 ($name) cannot be empty diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt index 4ad70a4eb9d8d..5aa695f8f2ae1 100644 --- a/ext/mysqli/tests/mysqli_report.phpt +++ b/ext/mysqli/tests/mysqli_report.phpt @@ -281,7 +281,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --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 diff --git a/ext/mysqli/tests/mysqli_report_new.phpt b/ext/mysqli/tests/mysqli_report_new.phpt index af951739c24b9..305d70108379c 100644 --- a/ext/mysqli/tests/mysqli_report_new.phpt +++ b/ext/mysqli/tests/mysqli_report_new.phpt @@ -6,11 +6,11 @@ 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 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-- @@ -41,7 +41,7 @@ if (mysqli_get_server_version($link) < 50600) ?> --CLEAN-- --EXPECTF-- Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt index 7103adfdb2a5f..7f0295dd44c71 100644 --- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt +++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt @@ -6,11 +6,11 @@ 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 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-- = 50600) ?> --CLEAN-- --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 diff --git a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt index 938f6e65dc38f..6be779f33134b 100644 --- a/ext/mysqli/tests/mysqli_result_invalid_mode.phpt +++ b/ext/mysqli/tests/mysqli_result_invalid_mode.phpt @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_result::__construct(): Argument #2 ($result_mode) must be either MYSQLI_STORE_RESULT or MYSQLI_USE_RESULT diff --git a/ext/mysqli/tests/mysqli_result_references.phpt b/ext/mysqli/tests/mysqli_result_references.phpt index f917d00ed3bd6..2e97cd45d795a 100644 --- a/ext/mysqli/tests/mysqli_result_references.phpt +++ b/ext/mysqli/tests/mysqli_result_references.phpt @@ -78,7 +78,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- array(7) refcount(2){ diff --git a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt index a5c68ca73f049..3c44f8a309edc 100644 --- a/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt +++ b/ext/mysqli/tests/mysqli_result_references_mysqlnd.phpt @@ -4,11 +4,10 @@ References to result sets - mysqlnd (no copies but references) + die("skip Test for mysqlnd only"); +?> --FILE-- errno, $link->error)); + if (!have_innodb($link)) + die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_savepoint.phpt b/ext/mysqli/tests/mysqli_savepoint.phpt index b3b616a70ee69..ebe27686aca87 100644 --- a/ext/mysqli/tests/mysqli_savepoint.phpt +++ b/ext/mysqli/tests/mysqli_savepoint.phpt @@ -7,10 +7,10 @@ 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-- --CLEAN-- --EXPECT-- mysqli_savepoint(): Argument #2 ($name) cannot be empty diff --git a/ext/mysqli/tests/mysqli_send_query.phpt b/ext/mysqli/tests/mysqli_send_query.phpt index 4e257bd0a11d8..0289e7733e5cc 100644 --- a/ext/mysqli/tests/mysqli_send_query.phpt +++ b/ext/mysqli/tests/mysqli_send_query.phpt @@ -5,11 +5,11 @@ mysqli_send_query() 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-- --FILE-- @@ -101,6 +101,20 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR } mysqli_free_result($res); + // Make sure that set_charset throws an exception in exception mode + mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); + try { + $link->set_charset('invalid'); + } catch (\mysqli_sql_exception $exception) { + echo "Exception: " . $exception->getMessage() . "\n"; + } + + try { + $link->set_charset('ucs2'); + } catch (\mysqli_sql_exception $exception) { + echo "Exception: " . $exception->getMessage() . "\n"; + } + mysqli_close($link); try { @@ -113,8 +127,10 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR ?> --CLEAN-- ---EXPECT-- +--EXPECTF-- +Exception: %s +Exception: Variable 'character_set_client' can't be set to the value of 'ucs2' mysqli object is already closed done! diff --git a/ext/mysqli/tests/mysqli_sqlstate.phpt b/ext/mysqli/tests/mysqli_sqlstate.phpt index d8272828097b4..e871d0ff3e593 100644 --- a/ext/mysqli/tests/mysqli_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_sqlstate.phpt @@ -29,7 +29,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- %s(5) "00000" diff --git a/ext/mysqli/tests/mysqli_ssl_set.phpt b/ext/mysqli/tests/mysqli_ssl_set.phpt index 6ccfb4359df3d..2ad705bda45bf 100644 --- a/ext/mysqli/tests/mysqli_ssl_set.phpt +++ b/ext/mysqli/tests/mysqli_ssl_set.phpt @@ -5,7 +5,7 @@ mysqli_ssl_set() - test is a stub! 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-- --CLEAN-- --EXPECTF-- [009] [%d] (error message varies with the MySQL Server version, check the error code) diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt index 5c246aaff8195..aea6c91ad00de 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get.phpt @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --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 diff --git a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt index 80956e854f61e..9ef46151f90c7 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_get_prefetch.phpt @@ -22,7 +22,7 @@ die("SKIP: prefetch isn't supported at the moment"); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index a22704af509bb..16d789f37f7fd 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -238,7 +238,7 @@ require_once("connect.inc"); ?> --CLEAN-- --EXPECT-- Error: mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt index 9479d233a950c..75351b0983c8e 100644 --- a/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_big_prepare.phpt @@ -43,7 +43,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt index 9345bb5a0e619..237b722646750 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param.phpt @@ -412,7 +412,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- The number of variables must match the number of parameters in the prepared statement diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt index e1e600229ca01..4db8db655ea32 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_call_user_func.phpt @@ -325,7 +325,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- Regular, procedural, using variables diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt index 9b70f23639192..b3a4bfe223625 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_check_param_no_change.phpt @@ -63,7 +63,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- Test 1: diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt index 38f25336250c7..b622f254d1ed5 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_references.phpt @@ -200,7 +200,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt index b69dfe686e73d..617e6e2cb0bad 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_type_juggling.phpt @@ -120,7 +120,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt index 99f2c8ef77122..5c4d43375de0d 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result.phpt @@ -308,7 +308,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt index ecad1393531f5..f24c5856ed04e 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_bit.phpt @@ -152,7 +152,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt index 05e75f7e23498..8ac3a049a16b8 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_references.phpt @@ -242,7 +242,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- plain vanilla... diff --git a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt index a49d0d0ed994f..00dcae479cc1a 100644 --- a/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt +++ b/ext/mysqli/tests/mysqli_stmt_bind_result_zerofill.phpt @@ -90,7 +90,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_close.phpt b/ext/mysqli/tests/mysqli_stmt_close.phpt index dd27da85ab188..ba0dcd7140d5a 100644 --- a/ext/mysqli/tests/mysqli_stmt_close.phpt +++ b/ext/mysqli/tests/mysqli_stmt_close.phpt @@ -77,7 +77,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt index ffd5960c06bfa..a16aa631e4a6e 100644 --- a/ext/mysqli/tests/mysqli_stmt_data_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_data_seek.phpt @@ -82,7 +82,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt index 2f18c6371fd73..14f1ebbe506ed 100644 --- a/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt +++ b/ext/mysqli/tests/mysqli_stmt_datatype_change.phpt @@ -60,7 +60,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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); ?> diff --git a/ext/mysqli/tests/mysqli_stmt_errno.phpt b/ext/mysqli/tests/mysqli_stmt_errno.phpt index b5d741cd6e062..b65770c444c63 100644 --- a/ext/mysqli/tests/mysqli_stmt_errno.phpt +++ b/ext/mysqli/tests/mysqli_stmt_errno.phpt @@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_error.phpt b/ext/mysqli/tests/mysqli_stmt_error.phpt index c8012b3434b54..0bf93edaa972f 100644 --- a/ext/mysqli/tests/mysqli_stmt_error.phpt +++ b/ext/mysqli/tests/mysqli_stmt_error.phpt @@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt index 1d1307e4b9551..a939a93d31e25 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt @@ -5,10 +5,10 @@ mysqli_stmt_execute() 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-- @@ -133,7 +133,7 @@ if (mysqli_get_server_version($link) <= 40100) { ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt index 33e6cd1c8b021..b26c16f98ae7c 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc.phpt @@ -6,10 +6,10 @@ 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 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-- @@ -188,7 +188,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) 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'); diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt index f322a1a76c36f..86a703c6412b9 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt @@ -6,10 +6,10 @@ 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 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-- diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt index 7cbbc74988e9b..667268b3aa1ef 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt @@ -6,14 +6,14 @@ 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 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 ?!")); } */ ?> diff --git a/ext/mysqli/tests/mysqli_stmt_fetch.phpt b/ext/mysqli/tests/mysqli_stmt_fetch.phpt index b99a326323bd6..64b4862653ad3 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch.phpt @@ -78,7 +78,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt index 87757dcaa9ab4..1e25a77a6b643 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_bit.phpt @@ -2,13 +2,13 @@ Fetching BIT column values using the PS API --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt index 086f4e08d8f18..073a48c228cc5 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_fields_win32_unicode.phpt @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- OK: 1 diff --git a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt index 3d177d903ded4..432d72fe545b1 100644 --- a/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_fetch_geom.phpt @@ -2,11 +2,11 @@ mysqli_stmt_fetch - geometry / spatial types --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_field_count.phpt index 939b3fcf5dc1a..4424248c48f2a 100644 --- a/ext/mysqli/tests/mysqli_stmt_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_field_count.phpt @@ -92,7 +92,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_free_result.phpt b/ext/mysqli/tests/mysqli_stmt_free_result.phpt index 833970a8b5a23..867a8193d4160 100644 --- a/ext/mysqli/tests/mysqli_stmt_free_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_free_result.phpt @@ -72,7 +72,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_get_result.phpt b/ext/mysqli/tests/mysqli_stmt_get_result.phpt index ca0b1ed03682c..2dee92d9ae9d3 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt index 2daa325b75762..99fabb89d8fdf 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result2.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result2.phpt @@ -5,7 +5,7 @@ mysqli_stmt_get_result() 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-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt index c9e00a793d8ec..dace91f4c89e9 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_bit.phpt @@ -2,17 +2,17 @@ Fetching BIT column values using the PS API --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt index ec313f06aa479..300a1e3397ceb 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_field_count.phpt @@ -2,11 +2,11 @@ mysqli_stmt_get_result() - meta data, field_count() --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- 2 2 diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt index 51d2875c96476..2105a590d436c 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_geom.phpt @@ -2,14 +2,14 @@ mysqli_stmt_get_result - geometry / spatial types --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt index f3810019c4ce0..2fe305ed21ceb 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECT-- array(2) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt index 0db422c03082c..0c9f0dfe23e7a 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_metadata_fetch_field.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECTF-- object(stdClass)#%d (13) { diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt index f86b7c6b79cde..f2428aeb92785 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_non_select.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt index 8dacc30ce96c8..8c3d6e1e35d60 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_seek.phpt @@ -6,7 +6,7 @@ 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-- --CLEAN-- --EXPECT-- mysqli_result::data_seek(): Argument #1 ($offset) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt index 1c2e857775e21..b188ed1d844b1 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_result_types.phpt @@ -2,11 +2,11 @@ mysqli_stmt_get_result - data types --SKIPIF-- --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt index 7e6fe07a14c2c..3787a13386c07 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt @@ -8,16 +8,16 @@ 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 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"); ?> @@ -96,7 +96,7 @@ mysqli_query($link, "DROP TABLE IF EXISTS test"); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_init.phpt b/ext/mysqli/tests/mysqli_stmt_init.phpt index 639c95944c3c5..22a21a64d27c1 100644 --- a/ext/mysqli/tests/mysqli_stmt_init.phpt +++ b/ext/mysqli/tests/mysqli_stmt_init.phpt @@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt index 092c90c2a92a4..d49bd1b094324 100644 --- a/ext/mysqli/tests/mysqli_stmt_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_stmt_insert_id.phpt @@ -66,7 +66,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_multires.phpt b/ext/mysqli/tests/mysqli_stmt_multires.phpt index abb9ecbfb2797..73af79e2b166e 100644 --- a/ext/mysqli/tests/mysqli_stmt_multires.phpt +++ b/ext/mysqli/tests/mysqli_stmt_multires.phpt @@ -94,10 +94,10 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- 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:" diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt index f006b974eb53a..8b932dc053469 100644 --- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt @@ -102,7 +102,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- run_tests.php don't fool me with your 'ungreedy' expression '.+?'! diff --git a/ext/mysqli/tests/mysqli_stmt_param_count.phpt b/ext/mysqli/tests/mysqli_stmt_param_count.phpt index 0d1fa5ca5560d..50886949359fe 100644 --- a/ext/mysqli/tests/mysqli_stmt_param_count.phpt +++ b/ext/mysqli/tests/mysqli_stmt_param_count.phpt @@ -53,7 +53,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_prepare.phpt b/ext/mysqli/tests/mysqli_stmt_prepare.phpt index 14929a9051b68..36ce473f3da1d 100644 --- a/ext/mysqli/tests/mysqli_stmt_prepare.phpt +++ b/ext/mysqli/tests/mysqli_stmt_prepare.phpt @@ -39,7 +39,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is already closed diff --git a/ext/mysqli/tests/mysqli_stmt_reset.phpt b/ext/mysqli/tests/mysqli_stmt_reset.phpt index 081a5f0855db6..933f0774bf0d7 100644 --- a/ext/mysqli/tests/mysqli_stmt_reset.phpt +++ b/ext/mysqli/tests/mysqli_stmt_reset.phpt @@ -97,7 +97,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt index 0c77186efc9a3..250e93ed001ca 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata.phpt @@ -86,7 +86,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECTF-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt index 877bd0c713769..929e9df645d01 100644 --- a/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt +++ b/ext/mysqli/tests/mysqli_stmt_result_metadata_sqltests.phpt @@ -225,7 +225,7 @@ die("skip Check again when the Klingons visit earth - http://bugs.mysql.com/bug. ?> --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt index b45098d298af0..b9139cb6e1979 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data.phpt @@ -105,7 +105,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt_send_long_data(): Argument #2 ($param_nr) must be greater than or equal to 0 diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt index c81e0c5d1a2d8..b191df602254b 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_libmysql.phpt @@ -6,7 +6,7 @@ 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"); ?> --FILE-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt index 64643d52f3008..c7376afdd3051 100644 --- a/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt +++ b/ext/mysqli/tests/mysqli_stmt_send_long_data_packet_size_mysqlnd.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); 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-- --CLEAN-- --EXPECT-- done! diff --git a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt index 959a5f715410e..edad2b9c3f90c 100644 --- a/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt +++ b/ext/mysqli/tests/mysqli_stmt_sqlstate.phpt @@ -46,7 +46,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_stmt_store_result.phpt b/ext/mysqli/tests/mysqli_stmt_store_result.phpt index e798ce8a3c433..d8f4c4769f78d 100644 --- a/ext/mysqli/tests/mysqli_stmt_store_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_store_result.phpt @@ -77,7 +77,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_stmt object is not fully initialized diff --git a/ext/mysqli/tests/mysqli_store_result.phpt b/ext/mysqli/tests/mysqli_store_result.phpt index 7a0157106d057..8d4e72bdf9be2 100644 --- a/ext/mysqli/tests/mysqli_store_result.phpt +++ b/ext/mysqli/tests/mysqli_store_result.phpt @@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt index 6fa69005d27b4..70a864270d9af 100644 --- a/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt +++ b/ext/mysqli/tests/mysqli_store_result_buffered_c.phpt @@ -4,9 +4,10 @@ mysqli_store_result() ---INI-- -mysqlnd.debug="d:t:O,{TMP}/mysqlnd.trace" --FILE-- --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_use_result.phpt b/ext/mysqli/tests/mysqli_use_result.phpt index ddbd734153eb0..a333891bba211 100644 --- a/ext/mysqli/tests/mysqli_use_result.phpt +++ b/ext/mysqli/tests/mysqli_use_result.phpt @@ -52,7 +52,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli_data_seek() cannot be used in MYSQLI_USE_RESULT mode diff --git a/ext/mysqli/tests/mysqli_warning_count.phpt b/ext/mysqli/tests/mysqli_warning_count.phpt index 1c1df0ccdfe58..5ad0e10334917 100644 --- a/ext/mysqli/tests/mysqli_warning_count.phpt +++ b/ext/mysqli/tests/mysqli_warning_count.phpt @@ -35,7 +35,7 @@ require_once('skipifconnectfailure.inc'); ?> --CLEAN-- --EXPECT-- mysqli object is already closed diff --git a/ext/mysqli/tests/mysqli_warning_unclonable.phpt b/ext/mysqli/tests/mysqli_warning_unclonable.phpt index 5e3758be961c1..e33bdb7d3a338 100644 --- a/ext/mysqli/tests/mysqli_warning_unclonable.phpt +++ b/ext/mysqli/tests/mysqli_warning_unclonable.phpt @@ -6,7 +6,7 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$TEST_EXPERIMENTAL) - die("skip - experimental (= unsupported) feature"); + die("skip - experimental (= unsupported) feature"); ?> --FILE-- --CLEAN-- --EXPECTF-- Fatal error: Trying to clone an uncloneable object of class mysqli_warning in %s on line %d diff --git a/ext/mysqli/tests/skipifemb.inc b/ext/mysqli/tests/skipifemb.inc deleted file mode 100644 index 2b7941d8254c3..0000000000000 --- a/ext/mysqli/tests/skipifemb.inc +++ /dev/null @@ -1,5 +0,0 @@ -embedded) - die("skip test doesn't run with embedded server"); -?> diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c index 252c05f676dd2..5915e1266e5d4 100644 --- a/ext/mysqlnd/mysqlnd_connection.c +++ b/ext/mysqlnd/mysqlnd_connection.c @@ -1152,8 +1152,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_charset)(MYSQLND_CONN_DATA * const conn, c DBG_INF_FMT("conn=%llu cs=%s", conn->thread_id, csname); if (!charset) { - SET_CLIENT_ERROR(conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, - "Invalid characterset or character set not supported"); + SET_CLIENT_ERROR(conn->error_info, CR_CANT_FIND_CHARSET, UNKNOWN_SQLSTATE, "Invalid character set was provided"); DBG_RETURN(ret); } @@ -1161,9 +1160,7 @@ MYSQLND_METHOD(mysqlnd_conn_data, set_charset)(MYSQLND_CONN_DATA * const conn, c char * query; size_t query_len = mnd_sprintf(&query, 0, "SET NAMES %s", csname); - if (FAIL == (ret = conn->m->query(conn, query, query_len))) { - php_error_docref(NULL, E_WARNING, "Error executing query"); - } else if (conn->error_info->error_no) { + if (FAIL == (ret = conn->m->query(conn, query, query_len)) || conn->error_info->error_no) { ret = FAIL; } else { conn->charset = charset; @@ -2132,23 +2129,16 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi } smart_str_appendl(&tmp_str, "WITH CONSISTENT SNAPSHOT", sizeof("WITH CONSISTENT SNAPSHOT") - 1); } - if (mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY)) { - zend_ulong server_version = conn->m->get_server_version(conn); - if (server_version < 50605L) { - php_error_docref(NULL, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required"); - smart_str_free(&tmp_str); - break; - } else if (mode & TRANS_START_READ_WRITE) { - if (tmp_str.s && ZSTR_LEN(tmp_str.s)) { - smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); - } - smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1); - } else if (mode & TRANS_START_READ_ONLY) { - if (tmp_str.s && ZSTR_LEN(tmp_str.s)) { - smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); - } - smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1); + if (mode & TRANS_START_READ_WRITE) { + if (tmp_str.s && ZSTR_LEN(tmp_str.s)) { + smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); } + smart_str_appendl(&tmp_str, "READ WRITE", sizeof("READ WRITE") - 1); + } else if (mode & TRANS_START_READ_ONLY) { + if (tmp_str.s && ZSTR_LEN(tmp_str.s)) { + smart_str_appendl(&tmp_str, ", ", sizeof(", ") - 1); + } + smart_str_appendl(&tmp_str, "READ ONLY", sizeof("READ ONLY") - 1); } smart_str_0(&tmp_str); @@ -2167,6 +2157,11 @@ MYSQLND_METHOD(mysqlnd_conn_data, tx_begin)(MYSQLND_CONN_DATA * conn, const unsi } ret = conn->m->query(conn, query, query_len); mnd_sprintf_free(query); + if (ret && mode & (TRANS_START_READ_WRITE | TRANS_START_READ_ONLY) && + mysqlnd_stmt_errno(conn) == 1064) { + php_error_docref(NULL, E_WARNING, "This server version doesn't support 'READ WRITE' and 'READ ONLY'. Minimum 5.6.5 is required"); + break; + } } } while (0); conn->m->local_tx_end(conn, this_func, ret); diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index 5ec7dd03e316c..f562e8fa5e19f 100644 --- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c +++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c @@ -48,6 +48,57 @@ MYSQLND_METHOD(mysqlnd_pfc, reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * cons #define STORE_HEADER_SIZE(safe_storage, buffer) COPY_HEADER((safe_storage), (buffer)) #define RESTORE_HEADER_SIZE(buffer, safe_storage) STORE_HEADER_SIZE((safe_storage), (buffer)) +#ifdef MYSQLND_COMPRESSION_ENABLED +static ssize_t write_compressed_packet( + const MYSQLND_PFC *pfc, MYSQLND_VIO *vio, + MYSQLND_STATS *conn_stats, MYSQLND_ERROR_INFO *error_info, + zend_uchar *uncompressed_payload, size_t to_be_sent, zend_uchar *compress_buf) { + DBG_ENTER("write_compressed_packet"); + /* here we need to compress the data and then write it, first comes the compressed header */ + size_t tmp_complen = to_be_sent; + size_t payload_size; + if (PASS == pfc->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen, + uncompressed_payload, to_be_sent)) + { + int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent); + payload_size = tmp_complen; + } else { + int3store(compress_buf + MYSQLND_HEADER_SIZE, 0); + memcpy(compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, uncompressed_payload, to_be_sent); + payload_size = to_be_sent; + } + + int3store(compress_buf, payload_size); + int1store(compress_buf + 3, pfc->data->compressed_envelope_packet_no); + DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE); + + ssize_t bytes_sent = vio->data->m.network_write(vio, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, conn_stats, error_info); + pfc->data->compressed_envelope_packet_no++; +#ifdef WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY + if (res == Z_OK) { + size_t decompressed_size = left + MYSQLND_HEADER_SIZE; + zend_uchar * decompressed_data = mnd_malloc(decompressed_size); + int error = pfc->data->m.decode(decompressed_data, decompressed_size, + compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size); + if (error == Z_OK) { + int i; + DBG_INF("success decompressing"); + for (i = 0 ; i < decompressed_size; i++) { + if (i && (i % 30 == 0)) { + printf("\n\t\t"); + } + printf("%.2X ", (int)*((char*)&(decompressed_data[i]))); + DBG_INF_FMT("%.2X ", (int)*((char*)&(decompressed_data[i]))); + } + } else { + DBG_INF("error decompressing"); + } + mnd_free(decompressed_data); + } +#endif /* WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY */ + DBG_RETURN(bytes_sent); +} +#endif /* {{{ mysqlnd_pfc::send */ /* @@ -90,53 +141,27 @@ MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const v DBG_INF_FMT("packet_no=%u", pfc->data->packet_no); #ifdef MYSQLND_COMPRESSION_ENABLED if (pfc->data->compressed == TRUE) { - /* here we need to compress the data and then write it, first comes the compressed header */ - size_t tmp_complen = to_be_sent; - size_t payload_size; zend_uchar * uncompressed_payload = p; /* should include the header */ - STORE_HEADER_SIZE(safe_storage, uncompressed_payload); int3store(uncompressed_payload, to_be_sent); int1store(uncompressed_payload + 3, pfc->data->packet_no); - if (PASS == pfc->data->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen, - uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE)) - { - int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent + MYSQLND_HEADER_SIZE); - payload_size = tmp_complen; + if (to_be_sent <= MYSQLND_MAX_PACKET_SIZE - MYSQLND_HEADER_SIZE) { + bytes_sent = write_compressed_packet( + pfc, vio, conn_stats, error_info, + uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE, compress_buf); } else { - int3store(compress_buf + MYSQLND_HEADER_SIZE, 0); - memcpy(compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE); - payload_size = to_be_sent + MYSQLND_HEADER_SIZE; + /* The uncompressed size including the header would overflow. Split into two + * compressed packets. The size of the first one is relatively arbitrary here. */ + const size_t split_off_bytes = 8192; + bytes_sent = write_compressed_packet( + pfc, vio, conn_stats, error_info, + uncompressed_payload, split_off_bytes, compress_buf); + bytes_sent = write_compressed_packet( + pfc, vio, conn_stats, error_info, + uncompressed_payload + split_off_bytes, + to_be_sent + MYSQLND_HEADER_SIZE - split_off_bytes, compress_buf); } RESTORE_HEADER_SIZE(uncompressed_payload, safe_storage); - - int3store(compress_buf, payload_size); - int1store(compress_buf + 3, pfc->data->packet_no); - DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE); - bytes_sent = vio->data->m.network_write(vio, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, conn_stats, error_info); - pfc->data->compressed_envelope_packet_no++; - #ifdef WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY - if (res == Z_OK) { - size_t decompressed_size = left + MYSQLND_HEADER_SIZE; - zend_uchar * decompressed_data = mnd_malloc(decompressed_size); - int error = pfc->data->m.decode(decompressed_data, decompressed_size, - compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size); - if (error == Z_OK) { - int i; - DBG_INF("success decompressing"); - for (i = 0 ; i < decompressed_size; i++) { - if (i && (i % 30 == 0)) { - printf("\n\t\t"); - } - printf("%.2X ", (int)*((char*)&(decompressed_data[i]))); - DBG_INF_FMT("%.2X ", (int)*((char*)&(decompressed_data[i]))); - } - } else { - DBG_INF("error decompressing"); - } - mnd_free(decompressed_data); - } - #endif /* WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY */ } else #endif /* MYSQLND_COMPRESSION_ENABLED */ { diff --git a/ext/oci8/tests/conn_attr_1.phpt b/ext/oci8/tests/conn_attr_1.phpt index ce23b2b5aace5..bcfb1e8515a56 100644 --- a/ext/oci8/tests/conn_attr_1.phpt +++ b/ext/oci8/tests/conn_attr_1.phpt @@ -11,7 +11,7 @@ if ($test_drcp) die("skip output might vary with DRCP"); 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-- diff --git a/ext/oci8/tests/conn_attr_2.phpt b/ext/oci8/tests/conn_attr_2.phpt index 61d59093b150a..0005faa9a35f5 100644 --- a/ext/oci8/tests/conn_attr_2.phpt +++ b/ext/oci8/tests/conn_attr_2.phpt @@ -10,7 +10,7 @@ if ($test_drcp) die("skip output might vary with DRCP"); 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-- diff --git a/ext/oci8/tests/conn_attr_3.phpt b/ext/oci8/tests/conn_attr_3.phpt index a116be0fab289..bcab76b80c2e4 100644 --- a/ext/oci8/tests/conn_attr_3.phpt +++ b/ext/oci8/tests/conn_attr_3.phpt @@ -10,7 +10,7 @@ if ($test_drcp) die("skip output might vary with DRCP"); 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-- diff --git a/ext/oci8/tests/conn_attr_5.phpt b/ext/oci8/tests/conn_attr_5.phpt index 4a58f917d3393..006b49ab1e341 100644 --- a/ext/oci8/tests/conn_attr_5.phpt +++ b/ext/oci8/tests/conn_attr_5.phpt @@ -10,7 +10,7 @@ if ($test_drcp) die("skip output might vary with DRCP"); 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-- diff --git a/ext/oci8/tests/connect_without_oracle_home.phpt b/ext/oci8/tests/connect_without_oracle_home.phpt index 203fd57e92350..57d348082bd95 100644 --- a/ext/oci8/tests/connect_without_oracle_home.phpt +++ b/ext/oci8/tests/connect_without_oracle_home.phpt @@ -8,7 +8,7 @@ phpinfo(INFO_MODULES); $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)) { diff --git a/ext/oci8/tests/connect_without_oracle_home_11.phpt b/ext/oci8/tests/connect_without_oracle_home_11.phpt index 85ac993877088..51e5ef38ac54a 100644 --- a/ext/oci8/tests/connect_without_oracle_home_11.phpt +++ b/ext/oci8/tests/connect_without_oracle_home_11.phpt @@ -8,7 +8,7 @@ phpinfo(INFO_MODULES); $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]) && diff --git a/ext/oci8/tests/edition_1.phpt b/ext/oci8/tests/edition_1.phpt index b75dfe4350f08..c013a687eb73a 100644 --- a/ext/oci8/tests/edition_1.phpt +++ b/ext/oci8/tests/edition_1.phpt @@ -15,7 +15,7 @@ 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]) && diff --git a/ext/oci8/tests/edition_2.phpt b/ext/oci8/tests/edition_2.phpt index a556fb4a17d8b..4aab1c36bca01 100644 --- a/ext/oci8/tests/edition_2.phpt +++ b/ext/oci8/tests/edition_2.phpt @@ -13,7 +13,7 @@ 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]) && diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index 8c7acd471feaa..cdc79b1057bf3 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/ext/oci8/tests/password_new.phpt @@ -16,7 +16,7 @@ if (!(isset($matches_sv[0]) && 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 diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt index 2fdef268317ed..37e725a9b7d03 100644 --- a/ext/oci8/tests/pecl_bug16035.phpt +++ b/ext/oci8/tests/pecl_bug16035.phpt @@ -8,7 +8,7 @@ phpinfo(INFO_MODULES); $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-- diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index 0297401f995dc..5f8fe821d40a6 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -7,7 +7,7 @@ require(__DIR__."/connect.inc"); 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]) && diff --git a/ext/oci8/tests/refcur_prefetch_2.phpt b/ext/oci8/tests/refcur_prefetch_2.phpt index 69146914a4bf7..de8197a5cb549 100644 --- a/ext/oci8/tests/refcur_prefetch_2.phpt +++ b/ext/oci8/tests/refcur_prefetch_2.phpt @@ -7,7 +7,7 @@ require(__DIR__."/connect.inc"); 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]) && diff --git a/ext/oci8/tests/refcur_prefetch_3.phpt b/ext/oci8/tests/refcur_prefetch_3.phpt index bfc2faf5bf097..719f765b4f440 100644 --- a/ext/oci8/tests/refcur_prefetch_3.phpt +++ b/ext/oci8/tests/refcur_prefetch_3.phpt @@ -11,7 +11,7 @@ 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]) && diff --git a/ext/oci8/tests/refcur_prefetch_4.phpt b/ext/oci8/tests/refcur_prefetch_4.phpt index 6c0b1b26d077e..64ccfbe166028 100644 --- a/ext/oci8/tests/refcur_prefetch_4.phpt +++ b/ext/oci8/tests/refcur_prefetch_4.phpt @@ -7,7 +7,7 @@ require(__DIR__."/connect.inc"); 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]) && diff --git a/ext/odbc/tests/bug60616.phpt b/ext/odbc/tests/bug60616.phpt index 9d98d46b08c59..d453efb010bbd 100644 --- a/ext/odbc/tests/bug60616.phpt +++ b/ext/odbc/tests/bug60616.phpt @@ -3,9 +3,9 @@ odbc_exec(): Getting accurate unicode data from query --SKIPIF-- --FILE-- --FILE-- --FILE-- cache_size; op_array->cache_size += sizeof(zval); } - } else if (opline->opcode != ZEND_RECV && opline->opcode != ZEND_EXT_NOP) { + } else if (opline->opcode != ZEND_RECV) { break; } opline++; diff --git a/ext/opcache/Optimizer/dce.c b/ext/opcache/Optimizer/dce.c index c2f7550e91c68..91c9665d1daae 100644 --- a/ext/opcache/Optimizer/dce.c +++ b/ext/opcache/Optimizer/dce.c @@ -152,7 +152,6 @@ static inline zend_bool may_have_side_effects( case ZEND_EXT_STMT: case ZEND_EXT_FCALL_BEGIN: case ZEND_EXT_FCALL_END: - case ZEND_EXT_NOP: case ZEND_TICKS: case ZEND_YIELD: case ZEND_YIELD_FROM: diff --git a/ext/opcache/Optimizer/zend_cfg.c b/ext/opcache/Optimizer/zend_cfg.c index f036950ffac4c..0560bcf2d5caa 100644 --- a/ext/opcache/Optimizer/zend_cfg.c +++ b/ext/opcache/Optimizer/zend_cfg.c @@ -112,10 +112,6 @@ static void zend_mark_reachable_blocks(const zend_op_array *op_array, zend_cfg * zend_basic_block *blocks = cfg->blocks; blocks[start].flags = ZEND_BB_START; - if (op_array->opcodes[0].opcode == ZEND_EXT_NOP - && (cfg->flags & ZEND_CFG_RECV_ENTRY)) { - blocks[1].flags |= ZEND_BB_RECV_ENTRY; - } zend_mark_reachable(op_array->opcodes, cfg, blocks + start); if (op_array->last_try_catch) { @@ -291,10 +287,6 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b /* Build CFG, Step 1: Find basic blocks starts, calculate number of blocks */ BB_START(0); - if (op_array->opcodes[0].opcode == ZEND_EXT_NOP - && (build_flags & ZEND_CFG_RECV_ENTRY)) { - BB_START(1); - } for (i = 0; i < op_array->last; i++) { zend_op *opline = op_array->opcodes + i; switch (opline->opcode) { @@ -434,7 +426,6 @@ int zend_build_cfg(zend_arena **arena, const zend_op_array *op_array, uint32_t b case ZEND_FUNC_GET_ARGS: flags |= ZEND_FUNC_VARARG; break; - case ZEND_EXT_NOP: case ZEND_EXT_STMT: flags |= ZEND_FUNC_HAS_EXTENDED_STMT; break; diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 46363acb7b2e1..71af3203dca38 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -44,7 +44,6 @@ #include "zend_accelerator_util_funcs.h" #include "zend_accelerator_hash.h" #include "zend_file_cache.h" -#include "zend_observer.h" #include "ext/pcre/php_pcre.h" #include "ext/standard/md5.h" #include "ext/hash/php_hash.h" @@ -2998,15 +2997,6 @@ static zend_result accel_post_startup(void) } } -#ifdef HAVE_JIT - /* TODO Observer support for JIT */ - if (ZEND_OBSERVER_ENABLED) { - JIT_G(enabled) = 0; - JIT_G(on) = 0; - zend_accel_error(ACCEL_LOG_INFO, "Observer extension present. Disabling JIT."); - } -#endif - /* Initialize zend_func_info_rid */ zend_optimizer_startup(); diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 7c9704954a354..094f4d56d6d34 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -24,6 +24,7 @@ #include "Zend/zend_constants.h" #include "Zend/zend_closures.h" #include "Zend/zend_ini.h" +#include "Zend/zend_observer.h" #include "zend_smart_str.h" #include "jit/zend_jit.h" @@ -2118,8 +2119,7 @@ static int zend_jit(const zend_op_array *op_array, zend_ssa *ssa, const zend_op } recv_emitted = 1; } else if (opline->opcode == ZEND_RECV) { - if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && op_array->opcodes[0].opcode != ZEND_EXT_NOP) { + if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { /* skip */ continue; } else if (recv_emitted) { @@ -3540,9 +3540,6 @@ static void ZEND_FASTCALL zend_runtime_jit(void) /* restore original opcode handlers */ if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } @@ -3576,9 +3573,6 @@ void zend_jit_check_funcs(HashTable *function_table, zend_bool is_method) { op_array = &func->op_array; opline = op_array->opcodes; if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } @@ -3651,9 +3645,6 @@ static int zend_jit_setup_hot_counters(zend_op_array *op_array) if (JIT_G(hot_func)) { if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } @@ -3692,9 +3683,6 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) /* Set run-time JIT handler */ ZEND_ASSERT(zend_jit_runtime_jit_handler != NULL); if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } @@ -3714,9 +3702,6 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) ZEND_ASSERT(zend_jit_profile_jit_handler != NULL); if (op_array->function_name) { if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 65b6f17c95799..4edb08e08f9b0 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -1743,8 +1743,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } } if (opline->opcode == ZEND_RECV_INIT - && !(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && op_array->opcodes[0].opcode != ZEND_EXT_NOP) { + && !(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { /* RECV_INIT always copy the constant */ ssa_var_info[ssa_ops[idx].result_def].type = _const_op_type(RT_CONSTANT(opline, opline->op2)); } else if ((opline->opcode == ZEND_FE_FETCH_R || opline->opcode == ZEND_FE_FETCH_RW) @@ -1806,8 +1805,7 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin } } if (opline->opcode == ZEND_RECV_INIT - && !(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && op_array->opcodes[0].opcode != ZEND_EXT_NOP) { + && !(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { /* RECV_INIT always copy the constant */ ssa_var_info[ssa_ops[idx].result_def].type = _const_op_type(RT_CONSTANT(opline, opline->op2)); } else { @@ -1887,7 +1885,6 @@ static zend_ssa *zend_jit_trace_build_tssa(zend_jit_trace_rec *trace_buffer, uin ssa_var_info[v].type = MAY_BE_UNDEF | MAY_BE_RC1 | MAY_BE_RCN | MAY_BE_REF | MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF; } if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) - && op_array->opcodes[0].opcode != ZEND_EXT_NOP && i < op_array->num_args) { /* Propagate argument type */ ssa_var_info[v].type &= STACK_INFO(frame->stack, i); @@ -5323,7 +5320,6 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par || prev_opline->opcode == ZEND_CHECK_UNDEF_ARGS) && p->op_array->num_args && (p->op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0 - && (p->op_array->opcodes[0].opcode != ZEND_EXT_NOP) && ((p+1)->op == ZEND_JIT_TRACE_VM || (p+1)->op == ZEND_JIT_TRACE_END) && TRACE_FRAME_NUM_ARGS(call) < p->op_array->num_args @@ -6814,9 +6810,6 @@ static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array) ZEND_ASSERT(zend_jit_func_trace_counter_handler != NULL); opline = op_array->opcodes; if (!(op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { - if (opline->opcode == ZEND_EXT_NOP) { - opline++; - } while (opline->opcode == ZEND_RECV || opline->opcode == ZEND_RECV_INIT) { opline++; } diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index befc6717d9d34..c689359272ede 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -9689,6 +9689,10 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend if (!trace && op_array == &func->op_array) { /* recursive call */ + if (ZEND_OBSERVER_ENABLED) { + | mov FCARG1a, FP + | EXT_CALL zend_observer_fcall_begin, r0 + } #ifdef CONTEXT_THREADED_JIT | call >1 |.cold_code @@ -9793,6 +9797,11 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend |3: } + if (ZEND_OBSERVER_ENABLED) { + | mov FCARG1a, FP + | EXT_CALL zend_observer_fcall_begin, r0 + } + if (trace) { if (!func && (opline->opcode != ZEND_DO_UCALL)) { | jmp >9 @@ -11170,6 +11179,11 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o if (return_value_used == 0) { |9: + if (ZEND_OBSERVER_ENABLED) { + | xor FCARG2a, FCARG2a + | mov FCARG1a, FP + | EXT_CALL zend_observer_fcall_end, r0 + } return 1; } @@ -11232,6 +11246,11 @@ static int zend_jit_return(dasm_State **Dst, const zend_op *opline, const zend_o } |9: + if (ZEND_OBSERVER_ENABLED) { + | LOAD_ZVAL_ADDR FCARG2a, ret_addr + | mov FCARG1a, FP + | EXT_CALL zend_observer_fcall_end, r0 + } return 1; } @@ -12199,8 +12218,7 @@ static int zend_jit_recv_init(dasm_State **Dst, const zend_op *opline, const zen zend_jit_addr res_addr = ZEND_ADDR_MEM_ZVAL(ZREG_FP, opline->result.var); if (JIT_G(trigger) != ZEND_JIT_ON_HOT_TRACE || - (op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) || - op_array->opcodes[0].opcode == ZEND_EXT_NOP) { + (op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS)) { | cmp dword EX->This.u2.num_args, arg_num | jae >5 } diff --git a/ext/opcache/tests/bug78185.phpt b/ext/opcache/tests/bug78185.phpt index 120f2b61090b8..56c0ae5586f3b 100644 --- a/ext/opcache/tests/bug78185.phpt +++ b/ext/opcache/tests/bug78185.phpt @@ -22,17 +22,17 @@ foreach (glob($pattern) as $p) { --CLEAN-- strlen(__DIR__)) { - rmdir($p); - $p = dirname($p); - } + unlink($p); + $p = dirname($p); + while(strlen($p) > strlen(__DIR__)) { + rmdir($p); + $p = dirname($p); + } } ?> --EXPECTF-- diff --git a/ext/openssl/tests/openssl_decrypt_ccm.phpt b/ext/openssl/tests/openssl_decrypt_ccm.phpt index 87b6d4b26465f..067cde083bf21 100644 --- a/ext/openssl/tests/openssl_decrypt_ccm.phpt +++ b/ext/openssl/tests/openssl_decrypt_ccm.phpt @@ -3,9 +3,9 @@ openssl_decrypt() with CCM cipher algorithm tests --SKIPIF-- --FILE-- --FILE-- --FILE-- --EXPECT-- diff --git a/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt b/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt index 43d51753a01a2..e7ee13caf6da6 100644 --- a/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs12_export_to_file_basic.phpt @@ -40,7 +40,7 @@ try { --EXPECTF-- diff --git a/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt b/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt index 92d7f2789ebc7..f65822e535d39 100644 --- a/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt +++ b/ext/openssl/tests/openssl_pkcs12_export_to_file_error.phpt @@ -23,7 +23,7 @@ var_dump(openssl_pkcs12_export_to_file($cert, '.', $priv, $pass)); --EXPECTF-- diff --git a/ext/pcntl/tests/001.phpt b/ext/pcntl/tests/001.phpt index cdfdb0733f9e9..16601cdb51c1f 100644 --- a/ext/pcntl/tests/001.phpt +++ b/ext/pcntl/tests/001.phpt @@ -2,8 +2,8 @@ Test pcntl wait functionality --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/pcre/tests/backtrack_limit.phpt b/ext/pcre/tests/backtrack_limit.phpt index 3f0d8e64468a0..3b6f7786a2c50 100644 --- a/ext/pcre/tests/backtrack_limit.phpt +++ b/ext/pcre/tests/backtrack_limit.phpt @@ -3,7 +3,7 @@ Backtracking limit --SKIPIF-- --INI-- diff --git a/ext/pcre/tests/bug27103.phpt b/ext/pcre/tests/bug27103.phpt index 0b706010a04f2..9ba70f7a64428 100644 --- a/ext/pcre/tests/bug27103.phpt +++ b/ext/pcre/tests/bug27103.phpt @@ -3,7 +3,7 @@ Bug #27103 (preg_split('//u') incorrectly splits UTF-8 strings into octets) --SKIPIF-- --FILE-- diff --git a/ext/pcre/tests/bug72463.phpt b/ext/pcre/tests/bug72463.phpt index b40a721998398..156b692ab0f84 100644 --- a/ext/pcre/tests/bug72463.phpt +++ b/ext/pcre/tests/bug72463.phpt @@ -3,7 +3,7 @@ Bug #72463 mail fails with invalid argument --SKIPIF-- --INI-- diff --git a/ext/pcre/tests/bug72463_2.phpt b/ext/pcre/tests/bug72463_2.phpt index 1baeb0f2a1154..3cc87b47ac5a4 100644 --- a/ext/pcre/tests/bug72463_2.phpt +++ b/ext/pcre/tests/bug72463_2.phpt @@ -3,7 +3,7 @@ Bug #72463 mail fails with invalid argument --SKIPIF-- --INI-- diff --git a/ext/pcre/tests/bug76850.phpt b/ext/pcre/tests/bug76850.phpt index 50c62ad1b335c..acceb2da7185b 100644 --- a/ext/pcre/tests/bug76850.phpt +++ b/ext/pcre/tests/bug76850.phpt @@ -2,10 +2,10 @@ Bug #76850 Exit code mangled by set locale/preg_match --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/pcre/tests/bug77193.phpt b/ext/pcre/tests/bug77193.phpt index 4fdb603b8591a..ddceb6141fefd 100644 --- a/ext/pcre/tests/bug77193.phpt +++ b/ext/pcre/tests/bug77193.phpt @@ -2,9 +2,9 @@ Bug #77193 Infinite loop in preg_replace_callback --SKIPIF-- --FILE-- --INI-- diff --git a/ext/pcre/tests/errors05.phpt b/ext/pcre/tests/errors05.phpt index 13fabc4f30f4c..dc60c24938e51 100644 --- a/ext/pcre/tests/errors05.phpt +++ b/ext/pcre/tests/errors05.phpt @@ -3,7 +3,7 @@ Test preg_match() function : error conditions - jit stacklimit exhausted --SKIPIF-- --INI-- diff --git a/ext/pcre/tests/invalid_utf8.phpt b/ext/pcre/tests/invalid_utf8.phpt index f24042a3bdf12..1a5124daaac3b 100644 --- a/ext/pcre/tests/invalid_utf8.phpt +++ b/ext/pcre/tests/invalid_utf8.phpt @@ -3,7 +3,7 @@ preg_replace() and invalid UTF8 --SKIPIF-- --FILE-- diff --git a/ext/pcre/tests/invalid_utf8_offset.phpt b/ext/pcre/tests/invalid_utf8_offset.phpt index 2b9e7fa239b16..311a6d73d6682 100644 --- a/ext/pcre/tests/invalid_utf8_offset.phpt +++ b/ext/pcre/tests/invalid_utf8_offset.phpt @@ -3,7 +3,7 @@ preg_replace() and invalid UTF8 offset --SKIPIF-- --FILE-- diff --git a/ext/pcre/tests/pcre_anchored.phpt b/ext/pcre/tests/pcre_anchored.phpt index c03d13501a7e4..7852cd6d62ff7 100644 --- a/ext/pcre/tests/pcre_anchored.phpt +++ b/ext/pcre/tests/pcre_anchored.phpt @@ -3,7 +3,7 @@ A (PCRE_ANCHORED) modifier --SKIPIF-- --FILE-- diff --git a/ext/pcre/tests/preg_match_error3.phpt b/ext/pcre/tests/preg_match_error3.phpt index 8b9d59fc58bd7..cf9c29a112cec 100644 --- a/ext/pcre/tests/preg_match_error3.phpt +++ b/ext/pcre/tests/preg_match_error3.phpt @@ -3,7 +3,7 @@ Test preg_match() function : error conditions - jit stacklimit exhausted --SKIPIF-- --INI-- diff --git a/ext/pcre/tests/preg_replace2.phpt b/ext/pcre/tests/preg_replace2.phpt index ac88e876e698c..e38c4788cb997 100644 --- a/ext/pcre/tests/preg_replace2.phpt +++ b/ext/pcre/tests/preg_replace2.phpt @@ -3,7 +3,7 @@ preg_replace() --SKIPIF-- --FILE-- diff --git a/ext/pcre/tests/recursion_limit.phpt b/ext/pcre/tests/recursion_limit.phpt index 294931388d6fc..5d08f1771bc27 100644 --- a/ext/pcre/tests/recursion_limit.phpt +++ b/ext/pcre/tests/recursion_limit.phpt @@ -3,7 +3,7 @@ PCRE Recursion limit --SKIPIF-- --INI-- diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt index 5f23f910eb6ec..0e1116d58863e 100644 --- a/ext/pdo/tests/bug_44159.phpt +++ b/ext/pdo/tests/bug_44159.phpt @@ -4,9 +4,9 @@ PDO Common: Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NUL --FILE-- diff --git a/ext/pdo/tests/bug_44861.phpt b/ext/pdo/tests/bug_44861.phpt index 6ca5b175636b6..73c2675c1a333 100644 --- a/ext/pdo/tests/bug_44861.phpt +++ b/ext/pdo/tests/bug_44861.phpt @@ -8,12 +8,12 @@ if (false == $dir) die('skip no driver'); $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(); diff --git a/ext/pdo/tests/bug_47769.phpt b/ext/pdo/tests/bug_47769.phpt index 2c308d9113213..daac15574a85d 100644 --- a/ext/pdo/tests/bug_47769.phpt +++ b/ext/pdo/tests/bug_47769.phpt @@ -3,7 +3,7 @@ PDO Common: Bug #47769 (Strange extends PDO) --SKIPIF-- --FILE-- 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-- diff --git a/ext/pdo/tests/pdo_dsn_containing_credentials.phpt b/ext/pdo/tests/pdo_dsn_containing_credentials.phpt index 7c67bc32273a4..e3d530ba49ee5 100644 --- a/ext/pdo/tests/pdo_dsn_containing_credentials.phpt +++ b/ext/pdo/tests/pdo_dsn_containing_credentials.phpt @@ -8,7 +8,7 @@ if (false == $dir) die('skip no driver'); $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(); diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 8c6f6a37f1d7b..95f719a6150f3 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -291,6 +291,11 @@ static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, size_t * } /* }}} */ +#if defined(PDO_USE_MYSQLND) || MYSQL_VERSION_ID < 50707 || defined(MARIADB_BASE_VERSION) +# define mysql_real_escape_string_quote(mysql, to, from, length, quote) \ + mysql_real_escape_string(mysql, to, from, length) +#endif + /* {{{ mysql_handle_quoter */ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unquotedlen, char **quoted, size_t *quotedlen, enum pdo_param_type paramtype ) { @@ -313,13 +318,13 @@ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, size_t unqu *quoted = safe_emalloc(2, unquotedlen, 3 + (use_national_character_set ? 1 : 0)); if (use_national_character_set) { - *quotedlen = mysql_real_escape_string(H->server, *quoted + 2, unquoted, unquotedlen); + *quotedlen = mysql_real_escape_string_quote(H->server, *quoted + 2, unquoted, unquotedlen, '\''); (*quoted)[0] = 'N'; (*quoted)[1] = '\''; ++*quotedlen; /* N prefix */ } else { - *quotedlen = mysql_real_escape_string(H->server, *quoted + 1, unquoted, unquotedlen); + *quotedlen = mysql_real_escape_string_quote(H->server, *quoted + 1, unquoted, unquotedlen, '\''); (*quoted)[0] = '\''; } diff --git a/ext/pdo_mysql/tests/bug_39858.phpt b/ext/pdo_mysql/tests/bug_39858.phpt index 9328c0f20d22e..e33415eb675a9 100644 --- a/ext/pdo_mysql/tests/bug_39858.phpt +++ b/ext/pdo_mysql/tests/bug_39858.phpt @@ -11,12 +11,12 @@ $db = MySQLPDOTest::factory(); $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 diff --git a/ext/pdo_mysql/tests/bug_41125.phpt b/ext/pdo_mysql/tests/bug_41125.phpt index c86cad2b51063..e7db01c8e3218 100644 --- a/ext/pdo_mysql/tests/bug_41125.phpt +++ b/ext/pdo_mysql/tests/bug_41125.phpt @@ -10,13 +10,13 @@ $db = MySQLPDOTest::factory(); $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-- 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-- query('SELECT VERSION() as _version'); $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-- query('SELECT VERSION() as _version'); $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-- 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-- 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-- --INI-- pdo.dsn.mysql="mysql:dbname=phptest;socket=/tmp/mysql.sock" diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt index 99754c9058307..1838336050a36 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options_libmysql.phpt @@ -6,7 +6,7 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'skipif.inc'); 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-- --FILE-- --FILE-- --FILE-- --FILE-- @@ -27,7 +27,6 @@ if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) { "MYSQL_ATTR_SSL_CIPHER" => true, "MYSQL_ATTR_COMPRESS" => true, "MYSQL_ATTR_MULTI_STATEMENTS" => true, - "MYSQL_ATTR_SSL_VERIFY_SERVER_CERT" => true, ); if (!MySQLPDOTest::isPDOMySQLnd()) { @@ -37,6 +36,7 @@ if (!extension_loaded('mysqli') && !extension_loaded('mysqlnd')) { } if (extension_loaded('mysqlnd')) { + $expected['MYSQL_ATTR_SSL_VERIFY_SERVER_CERT'] = true; $expected['MYSQL_ATTR_SERVER_PUBLIC_KEY'] = true; } else if (extension_loaded('mysqli')) { if (mysqli_get_client_version() > 50605) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_commit.phpt b/ext/pdo_mysql/tests/pdo_mysql_commit.phpt index 9dec5700b6dd3..506be6475f35c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_commit.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_commit.phpt @@ -7,7 +7,7 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); 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-- query('SELECT USER() as _user'); $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"); } ?> diff --git a/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt b/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt index 386dfb1e1eb44..80c6a23db8239 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_get_attribute.phpt @@ -7,7 +7,7 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); 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-- --FILE-- --FILE-- --FILE-- 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-- query('SELECT USER() as _user'); $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'] != '')) { diff --git a/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt b/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt index 96e77a1326af6..d27aefc6be46a 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_rollback.phpt @@ -7,7 +7,7 @@ require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); 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-- diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt index 31ee2a3e07341..8e9e60b99e3a6 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetchobject.phpt @@ -8,14 +8,14 @@ MySQLPDOTest::skip(); $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-- query('SELECT VERSION() as _version'); $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-- 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-- --FILE-- 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-- 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"); diff --git a/ext/pdo_pgsql/tests/bug68199.phpt b/ext/pdo_pgsql/tests/bug68199.phpt index 0c79faeeb963a..25a200365a1a4 100644 --- a/ext/pdo_pgsql/tests/bug68199.phpt +++ b/ext/pdo_pgsql/tests/bug68199.phpt @@ -9,7 +9,7 @@ PDOTest::skip(); $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+"); } ?> diff --git a/ext/pdo_pgsql/tests/bug69362.phpt b/ext/pdo_pgsql/tests/bug69362.phpt index 1fd4e80e7d669..c1ed7e615f485 100644 --- a/ext/pdo_pgsql/tests/bug69362.phpt +++ b/ext/pdo_pgsql/tests/bug69362.phpt @@ -19,17 +19,17 @@ $pass = 'testpass'; // 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"); diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt index 0023f9103158c..aca253f7b717a 100644 --- a/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt +++ b/ext/pdo_sqlite/tests/pdo_sqlite_open_flags.phpt @@ -20,7 +20,7 @@ var_dump($db->exec('CREATE TABLE test2 (id INT);')); --EXPECTF-- diff --git a/ext/phar/tests/024-opcache-win32.phpt b/ext/phar/tests/024-opcache-win32.phpt index b9d80929cc8b0..7887a24072325 100644 --- a/ext/phar/tests/024-opcache-win32.phpt +++ b/ext/phar/tests/024-opcache-win32.phpt @@ -5,8 +5,8 @@ Phar: phar:// include with Opcache --INI-- phar.require_hash=0 diff --git a/ext/phar/tests/bug77022.phpt b/ext/phar/tests/bug77022.phpt index c287bb339f09b..40d908f1eeb01 100644 --- a/ext/phar/tests/bug77022.phpt +++ b/ext/phar/tests/bug77022.phpt @@ -1,8 +1,8 @@ --TEST-- Phar: Bug #77022: PharData always creates new files with mode 0666 --SKIPIF-- - --FILE-- diff --git a/ext/phar/tests/bug79082.phpt b/ext/phar/tests/bug79082.phpt index 9ced140b28f91..512c4fb95c48c 100644 --- a/ext/phar/tests/bug79082.phpt +++ b/ext/phar/tests/bug79082.phpt @@ -1,8 +1,8 @@ --TEST-- Phar: Bug #79082: Files added to tar with Phar::buildFromIterator have all-access permissions --SKIPIF-- - --FILE-- diff --git a/ext/phar/tests/phar_buildfromdirectory2-win.phpt b/ext/phar/tests/phar_buildfromdirectory2-win.phpt index e67d03638805e..99d1ee7a060b3 100644 --- a/ext/phar/tests/phar_buildfromdirectory2-win.phpt +++ b/ext/phar/tests/phar_buildfromdirectory2-win.phpt @@ -2,8 +2,8 @@ Phar::buildFromDirectory() - non-directory passed as first parameter --SKIPIF-- --INI-- phar.require_hash=0 diff --git a/ext/phar/tests/phar_buildfromdirectory2.phpt b/ext/phar/tests/phar_buildfromdirectory2.phpt index d02d6146d64cb..0d25a60afad5e 100644 --- a/ext/phar/tests/phar_buildfromdirectory2.phpt +++ b/ext/phar/tests/phar_buildfromdirectory2.phpt @@ -2,8 +2,8 @@ Phar::buildFromDirectory() - non-directory passed as first parameter --SKIPIF-- --INI-- phar.require_hash=0 diff --git a/ext/posix/tests/posix_ctermid.phpt b/ext/posix/tests/posix_ctermid.phpt index 1d277659c49ec..b6e064801439f 100644 --- a/ext/posix/tests/posix_ctermid.phpt +++ b/ext/posix/tests/posix_ctermid.phpt @@ -8,7 +8,7 @@ Falko Menge, mail at falko-menge dot de PHP Testfest Berlin 2009-05-10 --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/posix/tests/posix_getpgrp_basic.phpt b/ext/posix/tests/posix_getpgrp_basic.phpt index ceb78bb700bfc..84da54d56307d 100644 --- a/ext/posix/tests/posix_getpgrp_basic.phpt +++ b/ext/posix/tests/posix_getpgrp_basic.phpt @@ -2,7 +2,7 @@ Test posix_getpgrp() function : basic functionality --SKIPIF-- --FILE-- --FILE-- --FILE-- User Group: PHPSP #phptestfestbrasil --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/posix/tests/posix_kill_error.phpt b/ext/posix/tests/posix_kill_error.phpt index e378fa241f8ff..9f0ca0b158a50 100644 --- a/ext/posix/tests/posix_kill_error.phpt +++ b/ext/posix/tests/posix_kill_error.phpt @@ -2,7 +2,7 @@ Test posix_kill() function : error conditions --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/posix/tests/posix_times_basic.phpt b/ext/posix/tests/posix_times_basic.phpt index 49da6b8aebd05..fd06320b0c2b4 100644 --- a/ext/posix/tests/posix_times_basic.phpt +++ b/ext/posix/tests/posix_times_basic.phpt @@ -2,7 +2,7 @@ Test posix_times() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt index 98488f68d19fc..9d070d8ec313d 100644 --- a/ext/posix/tests/posix_ttyname_error_wrongparams.phpt +++ b/ext/posix/tests/posix_ttyname_error_wrongparams.phpt @@ -9,10 +9,10 @@ Falko Menge, mail at falko-menge dot de PHP Testfest Berlin 2009-05-10 --SKIPIF-- diff --git a/ext/posix/tests/posix_uname_basic.phpt b/ext/posix/tests/posix_uname_basic.phpt index 49c2cf5609184..4133b745a4493 100644 --- a/ext/posix/tests/posix_uname_basic.phpt +++ b/ext/posix/tests/posix_uname_basic.phpt @@ -2,7 +2,7 @@ Test posix_uname() function : basic functionality --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/readline/tests/libedit_info_001-win32.phpt b/ext/readline/tests/libedit_info_001-win32.phpt index d14c7a2f46265..3a558b11eb662 100644 --- a/ext/readline/tests/libedit_info_001-win32.phpt +++ b/ext/readline/tests/libedit_info_001-win32.phpt @@ -4,7 +4,7 @@ readline_info(): Basic test --FILE-- diff --git a/ext/readline/tests/libedit_info_001.phpt b/ext/readline/tests/libedit_info_001.phpt index 4c77e7a97c0c3..46618120fba8a 100644 --- a/ext/readline/tests/libedit_info_001.phpt +++ b/ext/readline/tests/libedit_info_001.phpt @@ -4,7 +4,7 @@ readline_info(): Basic test --FILE-- diff --git a/ext/readline/tests/libedit_write_history_001-win32.phpt b/ext/readline/tests/libedit_write_history_001-win32.phpt index 28af4cbfddc53..6cc94bd1294f5 100644 --- a/ext/readline/tests/libedit_write_history_001-win32.phpt +++ b/ext/readline/tests/libedit_write_history_001-win32.phpt @@ -4,7 +4,7 @@ readline_write_history(): Basic test --FILE-- diff --git a/ext/readline/tests/libedit_write_history_001.phpt b/ext/readline/tests/libedit_write_history_001.phpt index 14c3282e6d173..96424e232f6b9 100644 --- a/ext/readline/tests/libedit_write_history_001.phpt +++ b/ext/readline/tests/libedit_write_history_001.phpt @@ -4,7 +4,7 @@ readline_write_history(): Basic test --FILE-- diff --git a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt index 8a1951062ff29..e4546bdb78fbe 100644 --- a/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt +++ b/ext/reflection/tests/ReflectionClass_getStaticPropertyValue_001.phpt @@ -33,14 +33,14 @@ var_dump($rcB->getStaticPropertyValue("publicOverridden")); 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"; diff --git a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt index 1414cfadb7a3a..2c855a0436747 100644 --- a/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt +++ b/ext/reflection/tests/ReflectionClass_setStaticPropertyValue_001.phpt @@ -35,14 +35,14 @@ print_r($rcB->getStaticProperties()); 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"; diff --git a/ext/session/tests/bug42596.phpt b/ext/session/tests/bug42596.phpt index 094bd31bcfd59..f27e86387e4fa 100644 --- a/ext/session/tests/bug42596.phpt +++ b/ext/session/tests/bug42596.phpt @@ -2,8 +2,8 @@ Bug #42596 (session.save_path MODE option will not set "write" bit for group or world) --SKIPIF-- --INI-- session.use_cookies=0 diff --git a/ext/session/tests/session_save_path_variation5.phpt b/ext/session/tests/session_save_path_variation5.phpt index 5388f82f45b7a..446a472ab4690 100644 --- a/ext/session/tests/session_save_path_variation5.phpt +++ b/ext/session/tests/session_save_path_variation5.phpt @@ -3,7 +3,7 @@ Test session_save_path() function : variation --SKIPIF-- --INI-- session.save_handler=files diff --git a/ext/shmop/tests/001.phpt b/ext/shmop/tests/001.phpt index 4cac82d2f0c8b..a0f85922eef8d 100644 --- a/ext/shmop/tests/001.phpt +++ b/ext/shmop/tests/001.phpt @@ -2,9 +2,9 @@ shmop extension test --SKIPIF-- --FILE-- --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/skeleton/tests/002.phpt b/ext/skeleton/tests/002.phpt index dcbdd8f2b28b1..6b42a28db3d6e 100644 --- a/ext/skeleton/tests/002.phpt +++ b/ext/skeleton/tests/002.phpt @@ -3,7 +3,7 @@ test1() Basic test --SKIPIF-- --FILE-- diff --git a/ext/skeleton/tests/003.phpt b/ext/skeleton/tests/003.phpt index 84c9fe160204a..0aca2155b5548 100644 --- a/ext/skeleton/tests/003.phpt +++ b/ext/skeleton/tests/003.phpt @@ -3,7 +3,7 @@ --SKIPIF-- --FILE-- diff --git a/ext/snmp/tests/bug64124.phpt b/ext/snmp/tests/bug64124.phpt index 9dac2c9e1bba4..5ad75353db86b 100644 --- a/ext/snmp/tests/bug64124.phpt +++ b/ext/snmp/tests/bug64124.phpt @@ -8,7 +8,7 @@ require_once(__DIR__.'/skipif.inc'); $packed = str_repeat(chr(0), 15) . chr(1); if (@inet_ntop($packed) === false) { - die("skip no IPv6 support"); + die("skip no IPv6 support"); } ?> --FILE-- diff --git a/ext/snmp/tests/ipv6.phpt b/ext/snmp/tests/ipv6.phpt index 38bf7ffcb60c4..a4ae028e42e9b 100644 --- a/ext/snmp/tests/ipv6.phpt +++ b/ext/snmp/tests/ipv6.phpt @@ -8,7 +8,7 @@ require_once(__DIR__.'/skipif.inc'); $packed = str_repeat(chr(0), 15) . chr(1); if (@inet_ntop($packed) === false) { - die("skip no IPv6 support"); + die("skip no IPv6 support"); } ?> --FILE-- diff --git a/ext/soap/tests/bug73037.phpt b/ext/soap/tests/bug73037.phpt index d835f2a2805f7..4e7293286244e 100644 --- a/ext/soap/tests/bug73037.phpt +++ b/ext/soap/tests/bug73037.phpt @@ -4,14 +4,14 @@ Bug #73037 SoapServer reports Bad Request when gzipped, var 0 server --SKIPIF-- --FILE-- --FILE-- --CONFLICTS-- server diff --git a/ext/soap/tests/schema/schema064.phpt b/ext/soap/tests/schema/schema064.phpt index 88f58cf8cec35..b52a0519f6374 100644 --- a/ext/soap/tests/schema/schema064.phpt +++ b/ext/soap/tests/schema/schema064.phpt @@ -3,7 +3,7 @@ SOAP XML Schema 64: standard date/time types --SKIPIF-- --FILE-- diff --git a/ext/soap/tests/server009.phpt b/ext/soap/tests/server009.phpt index 28d195a3ce401..c8367f1b624fb 100644 --- a/ext/soap/tests/server009.phpt +++ b/ext/soap/tests/server009.phpt @@ -2,10 +2,10 @@ SOAP Server 9: setclass and setpersistence(SOAP_PERSISTENCE_SESSION) --SKIPIF-- --INI-- session.auto_start=1 diff --git a/ext/soap/tests/server019.phpt b/ext/soap/tests/server019.phpt index 132b4dc1a5044..7838a824bc325 100644 --- a/ext/soap/tests/server019.phpt +++ b/ext/soap/tests/server019.phpt @@ -2,9 +2,9 @@ SOAP Server 19: compressed request (gzip) --SKIPIF-- --INI-- precision=14 diff --git a/ext/soap/tests/server020.phpt b/ext/soap/tests/server020.phpt index 69eb4f097b57a..c98517edeac5a 100644 --- a/ext/soap/tests/server020.phpt +++ b/ext/soap/tests/server020.phpt @@ -2,9 +2,9 @@ SOAP Server 20: compressed request (deflate) --SKIPIF-- --INI-- precision=14 diff --git a/ext/soap/tests/server029.phpt b/ext/soap/tests/server029.phpt index f5b28699a53da..7a75a2fec3d55 100644 --- a/ext/soap/tests/server029.phpt +++ b/ext/soap/tests/server029.phpt @@ -14,8 +14,8 @@ SOAP Server 29-CGI: new/addfunction/handle --SKIPIF-- --FILE-- --FILE-- --FILE-- '224.0.0.23', - "interface" => 'lo', + "group" => '224.0.0.23', + "interface" => 'lo', )); if ($so === false) { die('skip interface \'lo\' is unavailable.'); diff --git a/ext/sockets/tests/mcast_ipv4_send.phpt b/ext/sockets/tests/mcast_ipv4_send.phpt index e1e88aca416fe..027c07f1b8158 100644 --- a/ext/sockets/tests/mcast_ipv4_send.phpt +++ b/ext/sockets/tests/mcast_ipv4_send.phpt @@ -7,7 +7,7 @@ if (!extension_loaded('sockets')) { } $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-- '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.'); diff --git a/ext/sockets/tests/mcast_ipv6_recv_limited.phpt b/ext/sockets/tests/mcast_ipv6_recv_limited.phpt index 9bf0bbf91492a..247c41b19d577 100644 --- a/ext/sockets/tests/mcast_ipv6_recv_limited.phpt +++ b/ext/sockets/tests/mcast_ipv6_recv_limited.phpt @@ -6,7 +6,7 @@ if (!extension_loaded('sockets')) { 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); @@ -14,29 +14,29 @@ $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-- --FILE-- diff --git a/ext/sockets/tests/socket_abstract_path_sendmsg.phpt b/ext/sockets/tests/socket_abstract_path_sendmsg.phpt index ca9ab3f5348b0..796b406e26e69 100644 --- a/ext/sockets/tests/socket_abstract_path_sendmsg.phpt +++ b/ext/sockets/tests/socket_abstract_path_sendmsg.phpt @@ -3,10 +3,10 @@ Support for paths in the abstract namespace (bind, sendmsg, recvmsg) --SKIPIF-- --FILE-- diff --git a/ext/sockets/tests/socket_clear_error-win32.phpt b/ext/sockets/tests/socket_clear_error-win32.phpt index 3a0b1ea162a7a..c875cfd2e80fa 100644 --- a/ext/sockets/tests/socket_clear_error-win32.phpt +++ b/ext/sockets/tests/socket_clear_error-win32.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) { die('SKIP sockets extension not available.'); } if(substr(PHP_OS, 0, 3) != 'WIN' ) { - die('skip windows only test'); + die('skip windows only test'); } ?> --FILE-- diff --git a/ext/sockets/tests/socket_clear_error.phpt b/ext/sockets/tests/socket_clear_error.phpt index 273f7a0ca8d4e..9ea770954d539 100644 --- a/ext/sockets/tests/socket_clear_error.phpt +++ b/ext/sockets/tests/socket_clear_error.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) { die('SKIP sockets extension not available.'); } if(substr(PHP_OS, 0, 3) == 'WIN' ) { - die('skip windows only test'); + die('skip windows only test'); } ?> --FILE-- diff --git a/ext/sockets/tests/socket_create_listen-win32.phpt b/ext/sockets/tests/socket_create_listen-win32.phpt index 89d8dde0b2b83..73cc857617c9e 100644 --- a/ext/sockets/tests/socket_create_listen-win32.phpt +++ b/ext/sockets/tests/socket_create_listen-win32.phpt @@ -3,7 +3,7 @@ Test if socket binds on 31338 --SKIPIF-- '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-- --INI-- report_memleaks=0 diff --git a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt index 3dab562bbbf66..c5f61ec5470aa 100644 --- a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt +++ b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt @@ -6,7 +6,7 @@ Tatjana Andersen tatjana.andersen@redpill-linpro.com --SKIPIF-- diff --git a/ext/sockets/tests/socket_import_stream-1.phpt b/ext/sockets/tests/socket_import_stream-1.phpt index 9931535721a33..a89ccf807e272 100644 --- a/ext/sockets/tests/socket_import_stream-1.phpt +++ b/ext/sockets/tests/socket_import_stream-1.phpt @@ -3,7 +3,7 @@ socket_import_stream: Basic test --SKIPIF-- '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-- --INI-- report_memleaks=0 diff --git a/ext/sockets/tests/socket_listen-wrongparams.phpt b/ext/sockets/tests/socket_listen-wrongparams.phpt index 5262d5e4b3340..c7c066b5edc0d 100644 --- a/ext/sockets/tests/socket_listen-wrongparams.phpt +++ b/ext/sockets/tests/socket_listen-wrongparams.phpt @@ -3,7 +3,7 @@ Test parameter handling in socket_listen(). --SKIPIF-- diff --git a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt index 6e063c5b52018..a355a2486411f 100644 --- a/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt +++ b/ext/sockets/tests/socket_sentto_recvfrom_unix.phpt @@ -3,7 +3,7 @@ Test if socket_recvfrom() receives data sent by socket_sendto() through a Unix d --SKIPIF-- --FILE-- diff --git a/ext/sockets/tests/socket_shutdown-win32.phpt b/ext/sockets/tests/socket_shutdown-win32.phpt index aced74b7f8ec3..cc16c3a215871 100644 --- a/ext/sockets/tests/socket_shutdown-win32.phpt +++ b/ext/sockets/tests/socket_shutdown-win32.phpt @@ -8,7 +8,7 @@ if (!extension_loaded('sockets')) { die('SKIP sockets extension not available.'); } if(substr(PHP_OS, 0, 3) != 'WIN' ) { - die('skip windows only test'); + die('skip windows only test'); } ?> --FILE-- diff --git a/ext/sockets/tests/socket_shutdown.phpt b/ext/sockets/tests/socket_shutdown.phpt index 3dc62bc270731..7c12b616c1669 100644 --- a/ext/sockets/tests/socket_shutdown.phpt +++ b/ext/sockets/tests/socket_shutdown.phpt @@ -9,7 +9,7 @@ if (!extension_loaded('sockets')) { die('SKIP sockets extension not available.'); } if(substr(PHP_OS, 0, 3) == 'WIN' ) { - die('skip not for windows'); + die('skip not for windows'); } ?> --FILE-- diff --git a/ext/sockets/tests/unixloop.phpt b/ext/sockets/tests/unixloop.phpt index 31740c97c66e6..c3b80ff588e62 100644 --- a/ext/sockets/tests/unixloop.phpt +++ b/ext/sockets/tests/unixloop.phpt @@ -3,11 +3,11 @@ Unix domain socket Loopback test --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/spl/tests/bug65006.phpt b/ext/spl/tests/bug65006.phpt index 1393936c5a1a7..954811a784898 100644 --- a/ext/spl/tests/bug65006.phpt +++ b/ext/spl/tests/bug65006.phpt @@ -4,17 +4,17 @@ Bug #65006: spl_autoload_register fails with multiple callables using self, same --FILE-- diff --git a/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt index 4b75b3b28f02c..4bdb9fade4b15 100644 --- a/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt +++ b/ext/sqlite3/tests/sqlite3_15_open_error-win.phpt @@ -3,7 +3,7 @@ SQLite3::open error test --SKIPIF-- diff --git a/ext/sqlite3/tests/sqlite3_15_open_error.phpt b/ext/sqlite3/tests/sqlite3_15_open_error.phpt index 817affa78461a..219cb6051a954 100644 --- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt +++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt @@ -3,7 +3,7 @@ SQLite3::open error test --SKIPIF-- hasMethod("loadExtension")) { - die("skip - sqlite3 doesn't have loadExtension enabled"); + die("skip - sqlite3 doesn't have loadExtension enabled"); } ?> --INI-- diff --git a/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt b/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt index ab5d3fc99a8de..d8f59a5edb1b9 100644 --- a/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt +++ b/ext/sqlite3/tests/sqlite3_33_load_extension_param.phpt @@ -10,7 +10,7 @@ sqlite3.extension_dir="{TMP}" 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-- diff --git a/ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt b/ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt index f04df7750b2a4..7b0d5fea531fc 100644 --- a/ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt +++ b/ext/sqlite3/tests/sqlite3_34_load_extension_ext_dir.phpt @@ -8,7 +8,7 @@ Jelle Lampaert 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-- diff --git a/ext/sqlite3/tests/sqlite3_defensive.phpt b/ext/sqlite3/tests/sqlite3_defensive.phpt index 064d87b50a054..c8826af24f1cb 100644 --- a/ext/sqlite3/tests/sqlite3_defensive.phpt +++ b/ext/sqlite3/tests/sqlite3_defensive.phpt @@ -4,7 +4,7 @@ SQLite3 defensive mode ini setting diff --git a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt index 9a893c590d3a9..0b677c7378487 100644 --- a/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt +++ b/ext/sqlite3/tests/sqlite3stmt_getsql_expanded.phpt @@ -4,7 +4,7 @@ SQLite3Stmt::getSQL expanded test = 3.14'); + die('skip SQLite < 3.14 installed, requires SQLite >= 3.14'); } ?> --FILE-- diff --git a/ext/standard/tests/dir/opendir_variation5.phpt b/ext/standard/tests/dir/opendir_variation5.phpt index 59c8f072fa507..f6b2934474b83 100644 --- a/ext/standard/tests/dir/opendir_variation5.phpt +++ b/ext/standard/tests/dir/opendir_variation5.phpt @@ -3,7 +3,7 @@ Test opendir() function : usage variations - directories with restricted permiss --SKIPIF-- diff --git a/ext/standard/tests/dir/scandir_variation5.phpt b/ext/standard/tests/dir/scandir_variation5.phpt index da20b5289e6ae..7bee9f087a7f5 100644 --- a/ext/standard/tests/dir/scandir_variation5.phpt +++ b/ext/standard/tests/dir/scandir_variation5.phpt @@ -3,7 +3,7 @@ Test scandir() function : usage variations - different directory permissions --SKIPIF-- diff --git a/ext/standard/tests/file/bug41874_1.phpt b/ext/standard/tests/file/bug41874_1.phpt index ed14d87a6777c..b7be9d068a13b 100644 --- a/ext/standard/tests/file/bug41874_1.phpt +++ b/ext/standard/tests/file/bug41874_1.phpt @@ -5,7 +5,7 @@ Venkat Raman Don --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/bug41874_2.phpt b/ext/standard/tests/file/bug41874_2.phpt index 012fc01a3d206..f08e22fb02fd2 100644 --- a/ext/standard/tests/file/bug41874_2.phpt +++ b/ext/standard/tests/file/bug41874_2.phpt @@ -5,7 +5,7 @@ Venkat Raman Don --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/bug41874_3.phpt b/ext/standard/tests/file/bug41874_3.phpt index 01bd7dc60690f..6ecfb8f5d52a7 100644 --- a/ext/standard/tests/file/bug41874_3.phpt +++ b/ext/standard/tests/file/bug41874_3.phpt @@ -5,7 +5,7 @@ Venkat Raman Don --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/bug47517.phpt b/ext/standard/tests/file/bug47517.phpt index 4eaf9a132c674..22a2dc0c5f6a7 100644 --- a/ext/standard/tests/file/bug47517.phpt +++ b/ext/standard/tests/file/bug47517.phpt @@ -7,7 +7,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { } 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-- diff --git a/ext/standard/tests/file/bug47767.phpt b/ext/standard/tests/file/bug47767.phpt index a7c4f02e78f18..0ef3eb2091940 100644 --- a/ext/standard/tests/file/bug47767.phpt +++ b/ext/standard/tests/file/bug47767.phpt @@ -5,7 +5,7 @@ Venkat Raman Don --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/chroot_001.phpt b/ext/standard/tests/file/chroot_001.phpt index 7fda0b3654bae..a8bca2e04bde7 100644 --- a/ext/standard/tests/file/chroot_001.phpt +++ b/ext/standard/tests/file/chroot_001.phpt @@ -4,11 +4,11 @@ chroot() --FILE-- diff --git a/ext/standard/tests/file/file_get_contents_error001.phpt b/ext/standard/tests/file/file_get_contents_error001.phpt index 0bbce038e6ba4..f2803e9189ed6 100644 --- a/ext/standard/tests/file/file_get_contents_error001.phpt +++ b/ext/standard/tests/file/file_get_contents_error001.phpt @@ -7,7 +7,7 @@ file_get_contents() test using offset parameter out of range display_errors=false --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fopen_variation11-win32.phpt b/ext/standard/tests/file/fopen_variation11-win32.phpt index e6201829b005a..22368812637bc 100644 --- a/ext/standard/tests/file/fopen_variation11-win32.phpt +++ b/ext/standard/tests/file/fopen_variation11-win32.phpt @@ -7,7 +7,7 @@ Dave Kelsey 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.'); } ?> diff --git a/ext/standard/tests/file/fscanf_variation3.phpt b/ext/standard/tests/file/fscanf_variation3.phpt index 5226dba55a9aa..ae197b6f96fce 100644 --- a/ext/standard/tests/file/fscanf_variation3.phpt +++ b/ext/standard/tests/file/fscanf_variation3.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - integer formats with float values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation33.phpt b/ext/standard/tests/file/fscanf_variation33.phpt index 1809a0d1e5d68..c008c759c9b39 100644 --- a/ext/standard/tests/file/fscanf_variation33.phpt +++ b/ext/standard/tests/file/fscanf_variation33.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - hexa formats with integer values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation34.phpt b/ext/standard/tests/file/fscanf_variation34.phpt index ac202ab26e6cf..2dad3ace145fa 100644 --- a/ext/standard/tests/file/fscanf_variation34.phpt +++ b/ext/standard/tests/file/fscanf_variation34.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - hexa formats with float values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation39.phpt b/ext/standard/tests/file/fscanf_variation39.phpt index 25a0b38706c89..f04d3b7e3165c 100644 --- a/ext/standard/tests/file/fscanf_variation39.phpt +++ b/ext/standard/tests/file/fscanf_variation39.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - unsigned int formats with integer val --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation40.phpt b/ext/standard/tests/file/fscanf_variation40.phpt index f13af1a26a5f4..4b12a8cf0a1e9 100644 --- a/ext/standard/tests/file/fscanf_variation40.phpt +++ b/ext/standard/tests/file/fscanf_variation40.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - unsigned formats with float values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation55.phpt b/ext/standard/tests/file/fscanf_variation55.phpt index 3536d01b4200b..9b5eb967db75a 100644 --- a/ext/standard/tests/file/fscanf_variation55.phpt +++ b/ext/standard/tests/file/fscanf_variation55.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - tracking file pointer while reading --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/fscanf_variation9.phpt b/ext/standard/tests/file/fscanf_variation9.phpt index eafa78cefd1a8..8b88a036f3baf 100644 --- a/ext/standard/tests/file/fscanf_variation9.phpt +++ b/ext/standard/tests/file/fscanf_variation9.phpt @@ -3,7 +3,7 @@ Test fscanf() function: usage variations - float formats with integer values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/link_win32.phpt b/ext/standard/tests/file/link_win32.phpt index 2bba5469c723a..5aa3ce04fd8ca 100644 --- a/ext/standard/tests/file/link_win32.phpt +++ b/ext/standard/tests/file/link_win32.phpt @@ -5,7 +5,7 @@ Venkat Raman Don --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/file/mkdir-004.phpt b/ext/standard/tests/file/mkdir-004.phpt index 46db53108265a..7de0e45894d43 100644 --- a/ext/standard/tests/file/mkdir-004.phpt +++ b/ext/standard/tests/file/mkdir-004.phpt @@ -4,7 +4,7 @@ recursive mkdir() tests diff --git a/ext/standard/tests/file/mkdir-005.phpt b/ext/standard/tests/file/mkdir-005.phpt index 621c9922e553a..383f8b18e0527 100644 --- a/ext/standard/tests/file/mkdir-005.phpt +++ b/ext/standard/tests/file/mkdir-005.phpt @@ -4,7 +4,7 @@ recursive mkdir() tests diff --git a/ext/standard/tests/file/tempnam_variation3-win32.phpt b/ext/standard/tests/file/tempnam_variation3-win32.phpt index f47bb610c6cd6..86990f03416a4 100644 --- a/ext/standard/tests/file/tempnam_variation3-win32.phpt +++ b/ext/standard/tests/file/tempnam_variation3-win32.phpt @@ -3,7 +3,7 @@ Test tempnam() function: usage variations - obscure prefixes --SKIPIF-- --CONFLICTS-- obscure_filename diff --git a/ext/standard/tests/file/windows_links/bug48746_3.phpt b/ext/standard/tests/file/windows_links/bug48746_3.phpt index 09875f32c8cc7..8150e2c551006 100644 --- a/ext/standard/tests/file/windows_links/bug48746_3.phpt +++ b/ext/standard/tests/file/windows_links/bug48746_3.phpt @@ -5,12 +5,12 @@ Venkat Raman Don (don.raman@microsoft.com) --SKIPIF-- &1', $out); if (strpos($out[0], 'recognized')) { - die('skip. junction.exe not found in PATH.'); + die('skip. junction.exe not found in PATH.'); } ?> diff --git a/ext/standard/tests/file/windows_links/common.inc b/ext/standard/tests/file/windows_links/common.inc index b4a09e00c220c..c55aa5d01ad53 100644 --- a/ext/standard/tests/file/windows_links/common.inc +++ b/ext/standard/tests/file/windows_links/common.inc @@ -21,10 +21,10 @@ function get_mountvol() { } 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'); + } } diff --git a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt index b8235c8842691..5beb63f905c97 100644 --- a/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt +++ b/ext/standard/tests/file/windows_mb_path/bug75063_utf8.phpt @@ -60,8 +60,8 @@ $d0 = $prefix . DIRECTORY_SEPARATOR . $dir_basename; $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); diff --git a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt index 1e3d7cd19cc06..1502d62e02286 100644 --- a/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt +++ b/ext/standard/tests/file/windows_mb_path/test_long_path_mkdir.phpt @@ -8,7 +8,7 @@ skip_if_not_win(); $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"); } ?> diff --git a/ext/standard/tests/filters/bug74267.phpt b/ext/standard/tests/filters/bug74267.phpt index 7e5d550e175b7..703b6c0b87cff 100644 --- a/ext/standard/tests/filters/bug74267.phpt +++ b/ext/standard/tests/filters/bug74267.phpt @@ -6,14 +6,14 @@ $stream = fopen('php://memory', 'w'); 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); diff --git a/ext/standard/tests/general_functions/bug41518.phpt b/ext/standard/tests/general_functions/bug41518.phpt index 26e2413ce9a5e..3b5ad3a8336ad 100644 --- a/ext/standard/tests/general_functions/bug41518.phpt +++ b/ext/standard/tests/general_functions/bug41518.phpt @@ -5,7 +5,7 @@ Bug #41518 (file_exists() warns of open_basedir restriction on non-existent file $tmp_dir = __DIR__ . '/bug41518'; mkdir($tmp_dir); if (!is_dir($tmp_dir)) { - die("skip"); + die("skip"); } @unlink($tmp_dir); ?> diff --git a/ext/standard/tests/general_functions/dl-check-enabled.phpt b/ext/standard/tests/general_functions/dl-check-enabled.phpt index 7559b8d905c90..e989df0fb5a0b 100644 --- a/ext/standard/tests/general_functions/dl-check-enabled.phpt +++ b/ext/standard/tests/general_functions/dl-check-enabled.phpt @@ -7,7 +7,7 @@ User Group: PHP-WVL & PHPGent #PHPTestFest --INI-- diff --git a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt index 0fe2a5814343a..effae83464ed5 100644 --- a/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt +++ b/ext/standard/tests/general_functions/dl-cve-2007-4887.phpt @@ -4,7 +4,7 @@ dl() filename length checks (CVE-2007-4887) --INI-- diff --git a/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt b/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt index 746162c7bfbac..aaf7d042e536a 100644 --- a/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt +++ b/ext/standard/tests/general_functions/dl-full-path-not-supported.phpt @@ -7,7 +7,7 @@ User Group: PHP-WVL & PHPGent #PHPTestFest --INI-- diff --git a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt index 6bf3b2c0a66b5..e79bcad3c11c7 100644 --- a/ext/standard/tests/general_functions/proc_nice_basic-win.phpt +++ b/ext/standard/tests/general_functions/proc_nice_basic-win.phpt @@ -5,11 +5,11 @@ proc_nice() basic behaviour /* 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-- diff --git a/ext/standard/tests/general_functions/proc_nice_variation5.phpt b/ext/standard/tests/general_functions/proc_nice_variation5.phpt index 650b13c60c722..f4378a4d92b53 100644 --- a/ext/standard/tests/general_functions/proc_nice_variation5.phpt +++ b/ext/standard/tests/general_functions/proc_nice_variation5.phpt @@ -7,9 +7,9 @@ Michele Orselli (mo@ideato.it) Simone Gentili (sensorario@gmail.com) --SKIPIF-- --FILE-- $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"; + } + } } ?> diff --git a/ext/standard/tests/general_functions/proc_open_sockets2.phpt b/ext/standard/tests/general_functions/proc_open_sockets2.phpt index 25f3153ec4874..7f9e1a85c54f6 100644 --- a/ext/standard/tests/general_functions/proc_open_sockets2.phpt +++ b/ext/standard/tests/general_functions/proc_open_sockets2.phpt @@ -5,49 +5,49 @@ proc_open() with IO socketpairs 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])); diff --git a/ext/standard/tests/general_functions/proc_open_sockets3.phpt b/ext/standard/tests/general_functions/proc_open_sockets3.phpt index 5ee9e53b56b47..be2a3712382a3 100644 --- a/ext/standard/tests/general_functions/proc_open_sockets3.phpt +++ b/ext/standard/tests/general_functions/proc_open_sockets3.phpt @@ -5,34 +5,34 @@ proc_open() with socket and pipe 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); diff --git a/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt b/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt index 9a92bef794135..9e963dd1ce495 100644 --- a/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt +++ b/ext/standard/tests/general_functions/putenv_bug75574_cp936_win.phpt @@ -7,7 +7,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { 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"); } ?> diff --git a/ext/standard/tests/image/getimagesize.phpt b/ext/standard/tests/image/getimagesize.phpt index ed32ac7c0e914..582959f3ae6ee 100644 --- a/ext/standard/tests/image/getimagesize.phpt +++ b/ext/standard/tests/image/getimagesize.phpt @@ -2,7 +2,7 @@ GetImageSize() --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/ext/standard/tests/network/shutdown.phpt b/ext/standard/tests/network/shutdown.phpt index b8655cc1f487b..64373596a2756 100644 --- a/ext/standard/tests/network/shutdown.phpt +++ b/ext/standard/tests/network/shutdown.phpt @@ -2,7 +2,7 @@ stream_socket_shutdown() test on IPv4 TCP Loopback --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --CONFLICTS-- diff --git a/ext/standard/tests/streams/proc_open_bug51800.phpt b/ext/standard/tests/streams/proc_open_bug51800.phpt index 7cf502edd8645..3ae96ca3dd1b6 100644 --- a/ext/standard/tests/streams/proc_open_bug51800.phpt +++ b/ext/standard/tests/streams/proc_open_bug51800.phpt @@ -2,10 +2,10 @@ Bug #51800 proc_open on Windows hangs forever --SKIPIF-- --XFAIL-- pipes have to be read/written simultaneously diff --git a/ext/standard/tests/strings/bug65769.phpt b/ext/standard/tests/strings/bug65769.phpt index 31656ee60fe41..aedc303681f99 100644 --- a/ext/standard/tests/strings/bug65769.phpt +++ b/ext/standard/tests/strings/bug65769.phpt @@ -6,7 +6,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') { 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-- diff --git a/ext/standard/tests/strings/bug72663_2.phpt b/ext/standard/tests/strings/bug72663_2.phpt index fc8978439013f..d0d7f81008597 100644 --- a/ext/standard/tests/strings/bug72663_2.phpt +++ b/ext/standard/tests/strings/bug72663_2.phpt @@ -3,7 +3,7 @@ Bug #72663: Create an Unexpected Object and Don't Invoke __wakeup() in Deseriali --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/htmlentities02.phpt b/ext/standard/tests/strings/htmlentities02.phpt index 9e6a96e060985..e8d0b5b9f7459 100644 --- a/ext/standard/tests/strings/htmlentities02.phpt +++ b/ext/standard/tests/strings/htmlentities02.phpt @@ -4,7 +4,7 @@ htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15) --INI-- diff --git a/ext/standard/tests/strings/htmlentities03.phpt b/ext/standard/tests/strings/htmlentities03.phpt index 484065341496d..973bafedbd3b4 100644 --- a/ext/standard/tests/strings/htmlentities03.phpt +++ b/ext/standard/tests/strings/htmlentities03.phpt @@ -4,7 +4,7 @@ htmlentities() test 3 (setlocale / de_DE.ISO-8859-1) --INI-- diff --git a/ext/standard/tests/strings/htmlentities05.phpt b/ext/standard/tests/strings/htmlentities05.phpt index 04bf4deb00193..04dd756a3177a 100644 --- a/ext/standard/tests/strings/htmlentities05.phpt +++ b/ext/standard/tests/strings/htmlentities05.phpt @@ -5,7 +5,7 @@ output_handler= internal_encoding=cp1252 --SKIPIF-- --FILE-- --FILE-- 2147483647) { - die("skip 32bit test only"); + die("skip 32bit test only"); } ?> --FILE-- diff --git a/ext/standard/tests/strings/pack64.phpt b/ext/standard/tests/strings/pack64.phpt index cccdc1ba6e5f3..753821f654299 100644 --- a/ext/standard/tests/strings/pack64.phpt +++ b/ext/standard/tests/strings/pack64.phpt @@ -3,7 +3,7 @@ --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/pack64_32.phpt b/ext/standard/tests/strings/pack64_32.phpt index f52de63ca463d..978e04449de61 100644 --- a/ext/standard/tests/strings/pack64_32.phpt +++ b/ext/standard/tests/strings/pack64_32.phpt @@ -3,7 +3,7 @@ --SKIPIF-- 4) { - die("skip 32bit test only"); + die("skip 32bit test only"); } ?> --FILE-- diff --git a/ext/standard/tests/strings/printf_basic7.phpt b/ext/standard/tests/strings/printf_basic7.phpt index 19c1f42104782..b7218cd7de062 100644 --- a/ext/standard/tests/strings/printf_basic7.phpt +++ b/ext/standard/tests/strings/printf_basic7.phpt @@ -3,7 +3,7 @@ Test printf() function : basic functionality - unsigned format --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/printf_basic8.phpt b/ext/standard/tests/strings/printf_basic8.phpt index 800d6cc1e77aa..395972ba96c23 100644 --- a/ext/standard/tests/strings/printf_basic8.phpt +++ b/ext/standard/tests/strings/printf_basic8.phpt @@ -3,7 +3,7 @@ Test printf() function : basic functionality - octal format --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sprintf_basic7.phpt b/ext/standard/tests/strings/sprintf_basic7.phpt index 63cf1975bb686..77765aaf52e8c 100644 --- a/ext/standard/tests/strings/sprintf_basic7.phpt +++ b/ext/standard/tests/strings/sprintf_basic7.phpt @@ -3,7 +3,7 @@ Test sprintf() function : basic functionality - unsigned format --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sprintf_basic8.phpt b/ext/standard/tests/strings/sprintf_basic8.phpt index 5c8cdb5d5a0d4..e9696db27b161 100644 --- a/ext/standard/tests/strings/sprintf_basic8.phpt +++ b/ext/standard/tests/strings/sprintf_basic8.phpt @@ -3,7 +3,7 @@ Test sprintf() function : basic functionality - octal format --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sprintf_variation28.phpt b/ext/standard/tests/strings/sprintf_variation28.phpt index 53c6bd015f07f..4903d3ed154e6 100644 --- a/ext/standard/tests/strings/sprintf_variation28.phpt +++ b/ext/standard/tests/strings/sprintf_variation28.phpt @@ -3,7 +3,7 @@ Test sprintf() function : usage variations - octal formats with integer values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sprintf_variation34.phpt b/ext/standard/tests/strings/sprintf_variation34.phpt index a02f5cda6e5ab..c7ff681f57504 100644 --- a/ext/standard/tests/strings/sprintf_variation34.phpt +++ b/ext/standard/tests/strings/sprintf_variation34.phpt @@ -3,7 +3,7 @@ Test sprintf() function : usage variations - hexa formats with integer values --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sprintf_variation40.phpt b/ext/standard/tests/strings/sprintf_variation40.phpt index 9b3890f15df0e..3bec553dd862a 100644 --- a/ext/standard/tests/strings/sprintf_variation40.phpt +++ b/ext/standard/tests/strings/sprintf_variation40.phpt @@ -3,7 +3,7 @@ Test sprintf() function : usage variations - unsigned formats with integer value --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/strings/sscanf_basic6.phpt b/ext/standard/tests/strings/sscanf_basic6.phpt index dad84c3e6331f..5aec9c094089f 100644 --- a/ext/standard/tests/strings/sscanf_basic6.phpt +++ b/ext/standard/tests/strings/sscanf_basic6.phpt @@ -3,7 +3,7 @@ Test sscanf() function : basic functionality - unsigned format --SKIPIF-- --FILE-- diff --git a/ext/standard/tests/time/001.phpt b/ext/standard/tests/time/001.phpt index 34b87157f2243..afd32375bb828 100644 --- a/ext/standard/tests/time/001.phpt +++ b/ext/standard/tests/time/001.phpt @@ -2,7 +2,7 @@ microtime() function --SKIPIF-- --FILE-- --FILE-- diff --git a/ext/sysvsem/tests/nowait.phpt b/ext/sysvsem/tests/nowait.phpt index b52d2d7e20f4f..ef2ba56cbb5b6 100644 --- a/ext/sysvsem/tests/nowait.phpt +++ b/ext/sysvsem/tests/nowait.phpt @@ -3,7 +3,7 @@ Test sem_acquire with nowait option --SKIPIF-- --FILE-- diff --git a/ext/sysvsem/tests/sysv.phpt b/ext/sysvsem/tests/sysv.phpt index 14270ee608fa9..0ed7b8a76853b 100644 --- a/ext/sysvsem/tests/sysv.phpt +++ b/ext/sysvsem/tests/sysv.phpt @@ -3,7 +3,7 @@ General semaphore and shared memory test --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/bug32001.phpt b/ext/xml/tests/bug32001.phpt index 5ced12894020e..410a2f62ffec6 100644 --- a/ext/xml/tests/bug32001.phpt +++ b/ext/xml/tests/bug32001.phpt @@ -5,7 +5,7 @@ Bug #32001 (xml_parse*() goes into infinite loop when autodetection in effect), 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-- --FILE-- diff --git a/ext/xml/tests/xml_parse_into_struct_variation.phpt b/ext/xml/tests/xml_parse_into_struct_variation.phpt index 3f980495676f7..a03b86ac8ae6b 100644 --- a/ext/xml/tests/xml_parse_into_struct_variation.phpt +++ b/ext/xml/tests/xml_parse_into_struct_variation.phpt @@ -3,7 +3,7 @@ Test xml_parse_into_struct() function : variation --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml_parser_set_option_basic.phpt b/ext/xml/tests/xml_parser_set_option_basic.phpt index 7d398dfd7014e..cae9ed71466f5 100644 --- a/ext/xml/tests/xml_parser_set_option_basic.phpt +++ b/ext/xml/tests/xml_parser_set_option_basic.phpt @@ -3,7 +3,7 @@ Test xml_set_notation_decl_handler function : basic --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml_parser_set_option_variation3.phpt b/ext/xml/tests/xml_parser_set_option_variation3.phpt index 592c9f52e80bc..d1163de356e0b 100644 --- a/ext/xml/tests/xml_parser_set_option_variation3.phpt +++ b/ext/xml/tests/xml_parser_set_option_variation3.phpt @@ -3,7 +3,7 @@ Test xml_parser_set_option() function : usage variations --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml_set_notation_decl_handler_basic.phpt b/ext/xml/tests/xml_set_notation_decl_handler_basic.phpt index 6ceaea63d0914..aa37b84a5560c 100644 --- a/ext/xml/tests/xml_set_notation_decl_handler_basic.phpt +++ b/ext/xml/tests/xml_set_notation_decl_handler_basic.phpt @@ -3,7 +3,7 @@ Test xml_set_notation_decl_handler function : basic --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt b/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt index 54a71fd48c771..dc9efe278b969 100644 --- a/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt +++ b/ext/xml/tests/xml_set_processing_instruction_handler_basic.phpt @@ -3,7 +3,7 @@ Test xml_set_processing_instruction_handler function : basic --SKIPIF-- --FILE-- diff --git a/ext/xml/tests/xml_set_start_namespace_decl_handler_basic.phpt b/ext/xml/tests/xml_set_start_namespace_decl_handler_basic.phpt index 6a783f6cfcd71..ba27eec9f5f94 100644 --- a/ext/xml/tests/xml_set_start_namespace_decl_handler_basic.phpt +++ b/ext/xml/tests/xml_set_start_namespace_decl_handler_basic.phpt @@ -3,7 +3,7 @@ Test xml_set_start_namespace_decl_handler function: basic --SKIPIF-- --FILE-- diff --git a/ext/xmlwriter/php_xmlwriter.stub.php b/ext/xmlwriter/php_xmlwriter.stub.php index fd12e5bdbe4ef..897fe13b875a7 100644 --- a/ext/xmlwriter/php_xmlwriter.stub.php +++ b/ext/xmlwriter/php_xmlwriter.stub.php @@ -80,7 +80,7 @@ function xmlwriter_start_dtd_entity(XMLWriter $xmlwriter, string $name, bool $is function xmlwriter_end_dtd_entity(XMLWriter $xmlwriter): bool {} -function xmlwriter_write_dtd_entity(XMLWriter $xmlwriter, string $name, string $content, bool $isparam = false, string $publicId = UNKNOWN, string $systemId = UNKNOWN, string $ndataid = UNKNOWN): bool {} +function xmlwriter_write_dtd_entity(XMLWriter $xmlwriter, string $name, string $content, bool $isparam = false, ?string $publicId = null, ?string $systemId = null, ?string $ndataid = null): bool {} function xmlwriter_output_memory(XMLWriter $xmlwriter, bool $flush = true): string {} diff --git a/ext/xmlwriter/php_xmlwriter_arginfo.h b/ext/xmlwriter/php_xmlwriter_arginfo.h index ffd3ab51ca9ed..39597b4b826d1 100644 --- a/ext/xmlwriter/php_xmlwriter_arginfo.h +++ b/ext/xmlwriter/php_xmlwriter_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 7a12c6f16e2a21c8b57ec963ed7e5fa230e425aa */ + * Stub hash: b1a8634bf79e1ac8fb94611ab942e9e4c06636f9 */ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_xmlwriter_open_uri, 0, 1, XMLWriter, MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0) @@ -160,9 +160,9 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_write_dtd_entity, 0, 3 ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isparam, _IS_BOOL, 0, "false") - ZEND_ARG_TYPE_INFO(0, publicId, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, systemId, IS_STRING, 0) - ZEND_ARG_TYPE_INFO(0, ndataid, IS_STRING, 0) + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, publicId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, systemId, IS_STRING, 1, "null") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, ndataid, IS_STRING, 1, "null") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_xmlwriter_output_memory, 0, 1, IS_STRING, 0) diff --git a/ext/xmlwriter/tests/bug79029.phpt b/ext/xmlwriter/tests/bug79029.phpt index b6b0c84b182d0..2e6f70dc0ab22 100644 --- a/ext/xmlwriter/tests/bug79029.phpt +++ b/ext/xmlwriter/tests/bug79029.phpt @@ -1,7 +1,7 @@ --TEST-- #79029 (Use After Free's in XMLReader / XMLWriter) --SKIPIF-- - diff --git a/ext/xsl/tests/xsl-phpinfo.phpt b/ext/xsl/tests/xsl-phpinfo.phpt index 5f830356b7410..2119181a5b44d 100644 --- a/ext/xsl/tests/xsl-phpinfo.phpt +++ b/ext/xsl/tests/xsl-phpinfo.phpt @@ -2,9 +2,9 @@ Test phpinfo() displays xsl info --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- common.function_name) { - return (zend_observer_fcall){observer_begin, observer_end}; + return (zend_observer_fcall_handlers){observer_begin, observer_end}; } else if (ZT_G(observer_observe_functions) && fbc->common.function_name) { - return (zend_observer_fcall){observer_begin, observer_end}; + return (zend_observer_fcall_handlers){observer_begin, observer_end}; } - return (zend_observer_fcall){NULL, NULL}; + return (zend_observer_fcall_handlers){NULL, NULL}; } PHP_RINIT_FUNCTION(zend_test) diff --git a/ext/zend_test/tests/observer_generator_04.phpt b/ext/zend_test/tests/observer_generator_04.phpt index 6c2f18207783d..bf6b4e6c6947b 100644 --- a/ext/zend_test/tests/observer_generator_04.phpt +++ b/ext/zend_test/tests/observer_generator_04.phpt @@ -18,7 +18,7 @@ function fooResults() { function doSomething() { $generator = fooResults(); - + while($generator->current() !== NULL) { echo $generator->current() . PHP_EOL; if ($generator->current() === 5) { diff --git a/ext/zend_test/tests/observer_jit_01.phpt b/ext/zend_test/tests/observer_jit_01.phpt deleted file mode 100644 index f489986b6e79b..0000000000000 --- a/ext/zend_test/tests/observer_jit_01.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Observer: JIT is disabled when observer extension is present ---SKIPIF-- - - - ---INI-- -zend_test.observer.enabled=1 -zend_test.observer.observe_all=1 -opcache.enable=1 -opcache.enable_cli=1 -opcache.jit=1 -opcache.jit_buffer_size=1M ---FILE-- - ---EXPECTF-- - - -JIT enabled: no -JIT on: no - diff --git a/ext/zip/tests/bug51353.phpt b/ext/zip/tests/bug51353.phpt index ab021f4715944..3a4e74a07c806 100644 --- a/ext/zip/tests/bug51353.phpt +++ b/ext/zip/tests/bug51353.phpt @@ -46,7 +46,7 @@ unlink("$base_path/51353.zip"); $a = glob("$base_path/51353_unpack/*.txt"); foreach($a as $f) { - unlink($f); + unlink($f); } rmdir("$base_path/51353_unpack"); ?> diff --git a/ext/zip/tests/bug64342_0.phpt b/ext/zip/tests/bug64342_0.phpt index d187175cd9f98..43f60f5d7c566 100644 --- a/ext/zip/tests/bug64342_0.phpt +++ b/ext/zip/tests/bug64342_0.phpt @@ -2,7 +2,7 @@ Bug #64342 ZipArchive::addFile() has to check file existence (variation 1) --SKIPIF-- --FILE-- --FILE-- @@ -12,7 +12,7 @@ if (!extension_loaded('zlib')) { gzopen('someFile', 'c'); --CLEAN-- --EXPECTF-- Warning: gzopen(): gzopen failed in %s on line %d diff --git a/ext/zlib/tests/gzclose_basic.phpt b/ext/zlib/tests/gzclose_basic.phpt index f3387de09cee5..1f72fc1c88469 100644 --- a/ext/zlib/tests/gzclose_basic.phpt +++ b/ext/zlib/tests/gzclose_basic.phpt @@ -3,7 +3,7 @@ Test function gzclose() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzcompress_basic1.phpt b/ext/zlib/tests/gzcompress_basic1.phpt index 3a8ee949bc4a7..a5d27359274e3 100644 --- a/ext/zlib/tests/gzcompress_basic1.phpt +++ b/ext/zlib/tests/gzcompress_basic1.phpt @@ -3,7 +3,7 @@ Test gzcompress() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzcompress_error1.phpt b/ext/zlib/tests/gzcompress_error1.phpt index e559030151dc2..ff09d6568affc 100644 --- a/ext/zlib/tests/gzcompress_error1.phpt +++ b/ext/zlib/tests/gzcompress_error1.phpt @@ -3,7 +3,7 @@ Test gzcompress() function : error conditions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzcompress_variation1.phpt b/ext/zlib/tests/gzcompress_variation1.phpt index e3cc8e846beee..762aa3c870d63 100644 --- a/ext/zlib/tests/gzcompress_variation1.phpt +++ b/ext/zlib/tests/gzcompress_variation1.phpt @@ -3,7 +3,7 @@ Test gzcompress() function : variation --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzdeflate_basic1.phpt b/ext/zlib/tests/gzdeflate_basic1.phpt index 5257e4db6c537..7ace99a8a7e2f 100644 --- a/ext/zlib/tests/gzdeflate_basic1.phpt +++ b/ext/zlib/tests/gzdeflate_basic1.phpt @@ -3,7 +3,7 @@ Test gzdeflate() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzdeflate_error1.phpt b/ext/zlib/tests/gzdeflate_error1.phpt index fbcb2d95f317c..fea4dfec002a7 100644 --- a/ext/zlib/tests/gzdeflate_error1.phpt +++ b/ext/zlib/tests/gzdeflate_error1.phpt @@ -3,7 +3,7 @@ Test gzdeflate() function : error conditions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzdeflate_variation1.phpt b/ext/zlib/tests/gzdeflate_variation1.phpt index 3058b1d9008f4..e881d77b5102c 100644 --- a/ext/zlib/tests/gzdeflate_variation1.phpt +++ b/ext/zlib/tests/gzdeflate_variation1.phpt @@ -3,7 +3,7 @@ Test gzdeflate() function : variation --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzencode_basic1.phpt b/ext/zlib/tests/gzencode_basic1.phpt index 927e0406db246..b129399dfd7ae 100644 --- a/ext/zlib/tests/gzencode_basic1.phpt +++ b/ext/zlib/tests/gzencode_basic1.phpt @@ -3,7 +3,7 @@ Test gzencode() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzencode_error1.phpt b/ext/zlib/tests/gzencode_error1.phpt index 5d850e5438af7..951437b98a085 100644 --- a/ext/zlib/tests/gzencode_error1.phpt +++ b/ext/zlib/tests/gzencode_error1.phpt @@ -3,7 +3,7 @@ Test gzencode() function : error conditions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzencode_variation1-win32.phpt b/ext/zlib/tests/gzencode_variation1-win32.phpt index 7272b4e7dc582..f7870e890fa55 100644 --- a/ext/zlib/tests/gzencode_variation1-win32.phpt +++ b/ext/zlib/tests/gzencode_variation1-win32.phpt @@ -8,7 +8,7 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) { } if (!extension_loaded("zlib")) { - print "skip - ZLIB extension not loaded"; + print "skip - ZLIB extension not loaded"; } ?> --FILE-- diff --git a/ext/zlib/tests/gzencode_variation1.phpt b/ext/zlib/tests/gzencode_variation1.phpt index 625745629872c..b3987b9d205fa 100644 --- a/ext/zlib/tests/gzencode_variation1.phpt +++ b/ext/zlib/tests/gzencode_variation1.phpt @@ -8,7 +8,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) { } if (!extension_loaded("zlib")) { - print "skip - ZLIB extension not loaded"; + print "skip - ZLIB extension not loaded"; } if (PHP_OS == "Darwin") { diff --git a/ext/zlib/tests/gzencode_variation2-win32.phpt b/ext/zlib/tests/gzencode_variation2-win32.phpt index 5ad5a1cdc424e..727a079b61275 100644 --- a/ext/zlib/tests/gzencode_variation2-win32.phpt +++ b/ext/zlib/tests/gzencode_variation2-win32.phpt @@ -8,12 +8,12 @@ if( substr(PHP_OS, 0, 3) != "WIN" ) { } 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-- diff --git a/ext/zlib/tests/gzencode_variation2.phpt b/ext/zlib/tests/gzencode_variation2.phpt index d5c0844006908..f1e3c0d2baba2 100644 --- a/ext/zlib/tests/gzencode_variation2.phpt +++ b/ext/zlib/tests/gzencode_variation2.phpt @@ -8,7 +8,7 @@ if( substr(PHP_OS, 0, 3) == "WIN" ) { } if (!extension_loaded("zlib")) { - print "skip - ZLIB extension not loaded"; + print "skip - ZLIB extension not loaded"; } if (PHP_OS == "Darwin") { diff --git a/ext/zlib/tests/gzeof_basic.phpt b/ext/zlib/tests/gzeof_basic.phpt index c159819d76b4e..f92450d22b98c 100644 --- a/ext/zlib/tests/gzeof_basic.phpt +++ b/ext/zlib/tests/gzeof_basic.phpt @@ -3,7 +3,7 @@ Test function feof() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzeof_variation1.phpt b/ext/zlib/tests/gzeof_variation1.phpt index 2dded2ca1a4ab..3be013facfa04 100644 --- a/ext/zlib/tests/gzeof_variation1.phpt +++ b/ext/zlib/tests/gzeof_variation1.phpt @@ -3,7 +3,7 @@ Test function gzeof while writing. --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzfile_variation15.phpt b/ext/zlib/tests/gzfile_variation15.phpt index 01958214bcb00..7fb103b3ecc9f 100644 --- a/ext/zlib/tests/gzfile_variation15.phpt +++ b/ext/zlib/tests/gzfile_variation15.phpt @@ -3,7 +3,7 @@ Test gzfile() function : variation: use include path (relative directories in pa --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzgetc_basic.phpt b/ext/zlib/tests/gzgetc_basic.phpt index c9b7fcf6159be..5eff9b6d5df8c 100644 --- a/ext/zlib/tests/gzgetc_basic.phpt +++ b/ext/zlib/tests/gzgetc_basic.phpt @@ -3,11 +3,11 @@ Test function gzgetc() by calling it with its expected arguments zlib 1.2.5 --SKIPIF-- 0) { - die('skip - only for zlib <= 1.2.5'); + die('skip - only for zlib <= 1.2.5'); } ?> --FILE-- diff --git a/ext/zlib/tests/gzgetc_basic_1.phpt b/ext/zlib/tests/gzgetc_basic_1.phpt index b2a1a056af68b..49e4ab8f6becf 100644 --- a/ext/zlib/tests/gzgetc_basic_1.phpt +++ b/ext/zlib/tests/gzgetc_basic_1.phpt @@ -3,11 +3,11 @@ Test function gzgetc() by calling it with its expected arguments zlib 1.2.7 --SKIPIF-- = 1.2.7'); + die('skip - only for zlib >= 1.2.7'); } ?> --FILE-- diff --git a/ext/zlib/tests/gzgets_basic.phpt b/ext/zlib/tests/gzgets_basic.phpt index 80ef741423142..4f4e908645d65 100644 --- a/ext/zlib/tests/gzgets_basic.phpt +++ b/ext/zlib/tests/gzgets_basic.phpt @@ -3,7 +3,7 @@ Test function gzgets() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzinflate_error1.phpt b/ext/zlib/tests/gzinflate_error1.phpt index 2ddb3adb6b9fc..67f2aa438bce7 100644 --- a/ext/zlib/tests/gzinflate_error1.phpt +++ b/ext/zlib/tests/gzinflate_error1.phpt @@ -3,7 +3,7 @@ Test gzinflate() function : error conditions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_basic.phpt b/ext/zlib/tests/gzopen_basic.phpt index a1768e8e00584..cbb4174f9fe00 100644 --- a/ext/zlib/tests/gzopen_basic.phpt +++ b/ext/zlib/tests/gzopen_basic.phpt @@ -3,7 +3,7 @@ Test gzopen() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_basic2.phpt b/ext/zlib/tests/gzopen_basic2.phpt index 2b5a9c61d1604..5814b5168f377 100644 --- a/ext/zlib/tests/gzopen_basic2.phpt +++ b/ext/zlib/tests/gzopen_basic2.phpt @@ -3,7 +3,7 @@ Test gzopen() function : basic functionality for writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation4.phpt b/ext/zlib/tests/gzopen_variation4.phpt index 3fe924a282fc0..6505306c4534e 100644 --- a/ext/zlib/tests/gzopen_variation4.phpt +++ b/ext/zlib/tests/gzopen_variation4.phpt @@ -3,7 +3,7 @@ Test gzopen() function : variation: use include path (relative directories in pa --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation5.phpt b/ext/zlib/tests/gzopen_variation5.phpt index a1cf48ba18ed0..e06c358d80d90 100644 --- a/ext/zlib/tests/gzopen_variation5.phpt +++ b/ext/zlib/tests/gzopen_variation5.phpt @@ -3,7 +3,7 @@ Test gzopen() function : variation: use include path and stream context create a --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation6.phpt b/ext/zlib/tests/gzopen_variation6.phpt index 631314818fcdd..16b266db65a5e 100644 --- a/ext/zlib/tests/gzopen_variation6.phpt +++ b/ext/zlib/tests/gzopen_variation6.phpt @@ -3,7 +3,7 @@ Test gzopen() function : variation: relative/absolute file --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation7.phpt b/ext/zlib/tests/gzopen_variation7.phpt index f3ba9a4fbc50e..7eef44a702bdc 100644 --- a/ext/zlib/tests/gzopen_variation7.phpt +++ b/ext/zlib/tests/gzopen_variation7.phpt @@ -3,7 +3,7 @@ Test function gzopen() by calling it twice on the same file and not closing one --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation8.phpt b/ext/zlib/tests/gzopen_variation8.phpt index 1885a048d6807..b2b12276ebd25 100644 --- a/ext/zlib/tests/gzopen_variation8.phpt +++ b/ext/zlib/tests/gzopen_variation8.phpt @@ -3,7 +3,7 @@ Test gzopen() function : variation: opening a plain file --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzopen_variation9.phpt b/ext/zlib/tests/gzopen_variation9.phpt index 91e2a4297657f..b8b895a92d524 100644 --- a/ext/zlib/tests/gzopen_variation9.phpt +++ b/ext/zlib/tests/gzopen_variation9.phpt @@ -3,7 +3,7 @@ Test gzopen() function : variation: try opening with possibly invalid modes --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzpassthru_basic.phpt b/ext/zlib/tests/gzpassthru_basic.phpt index 5606114bc3d8b..4ca2780b41355 100644 --- a/ext/zlib/tests/gzpassthru_basic.phpt +++ b/ext/zlib/tests/gzpassthru_basic.phpt @@ -3,7 +3,7 @@ Test function gzpassthru() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzputs_basic.phpt b/ext/zlib/tests/gzputs_basic.phpt index e1414d2504e55..6fd4d0748de63 100644 --- a/ext/zlib/tests/gzputs_basic.phpt +++ b/ext/zlib/tests/gzputs_basic.phpt @@ -3,7 +3,7 @@ Test function gzputs() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzread_basic.phpt b/ext/zlib/tests/gzread_basic.phpt index 1b66d85fc10cc..356eb2c845049 100644 --- a/ext/zlib/tests/gzread_basic.phpt +++ b/ext/zlib/tests/gzread_basic.phpt @@ -3,7 +3,7 @@ Test function gzread() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzread_error2.phpt b/ext/zlib/tests/gzread_error2.phpt index ff0dfe80289fe..0b4c4d13fcbc6 100644 --- a/ext/zlib/tests/gzread_error2.phpt +++ b/ext/zlib/tests/gzread_error2.phpt @@ -3,7 +3,7 @@ Test function gzread() by calling it invalid lengths --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzread_variation1.phpt b/ext/zlib/tests/gzread_variation1.phpt index bc9eee4f94681..f5968e28ad233 100644 --- a/ext/zlib/tests/gzread_variation1.phpt +++ b/ext/zlib/tests/gzread_variation1.phpt @@ -3,7 +3,7 @@ Test function gzread() by calling it while file open for writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzrewind_basic.phpt b/ext/zlib/tests/gzrewind_basic.phpt index 988e10a36622e..ffed16d4e9167 100644 --- a/ext/zlib/tests/gzrewind_basic.phpt +++ b/ext/zlib/tests/gzrewind_basic.phpt @@ -3,7 +3,7 @@ Test function gzrewind() by calling it with its expected arguments when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzrewind_basic2.phpt b/ext/zlib/tests/gzrewind_basic2.phpt index d1a2d296fc33d..1522750c5ba21 100644 --- a/ext/zlib/tests/gzrewind_basic2.phpt +++ b/ext/zlib/tests/gzrewind_basic2.phpt @@ -3,7 +3,7 @@ Test function gzrewind() by calling it with its expected arguments when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzrewind_variation1.phpt b/ext/zlib/tests/gzrewind_variation1.phpt index 1704771679e77..0b2053993d96a 100644 --- a/ext/zlib/tests/gzrewind_variation1.phpt +++ b/ext/zlib/tests/gzrewind_variation1.phpt @@ -3,7 +3,7 @@ Test function gzrewind() by calling it with its expected arguments when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_basic.phpt b/ext/zlib/tests/gzseek_basic.phpt index 2cc13595591eb..9a835f8df5b3c 100644 --- a/ext/zlib/tests/gzseek_basic.phpt +++ b/ext/zlib/tests/gzseek_basic.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with its expected arguments when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_basic2.phpt b/ext/zlib/tests/gzseek_basic2.phpt index a463d607f1815..c9d60ebcfd3a7 100644 --- a/ext/zlib/tests/gzseek_basic2.phpt +++ b/ext/zlib/tests/gzseek_basic2.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with its expected arguments when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation1.phpt b/ext/zlib/tests/gzseek_variation1.phpt index 81fe035987915..e5dcefc9bb065 100644 --- a/ext/zlib/tests/gzseek_variation1.phpt +++ b/ext/zlib/tests/gzseek_variation1.phpt @@ -3,7 +3,7 @@ Test function gzseek() by seeking forward in write mode --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation2.phpt b/ext/zlib/tests/gzseek_variation2.phpt index 56b4fa9ec132d..50ad28f36fea1 100644 --- a/ext/zlib/tests/gzseek_variation2.phpt +++ b/ext/zlib/tests/gzseek_variation2.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_SET when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation3.phpt b/ext/zlib/tests/gzseek_variation3.phpt index 77e0e33e019d6..0ba9eb68eaf0d 100644 --- a/ext/zlib/tests/gzseek_variation3.phpt +++ b/ext/zlib/tests/gzseek_variation3.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_CUR when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation4.phpt b/ext/zlib/tests/gzseek_variation4.phpt index 09e38cd33d6da..2850efa7d64c8 100644 --- a/ext/zlib/tests/gzseek_variation4.phpt +++ b/ext/zlib/tests/gzseek_variation4.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_SET when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation5.phpt b/ext/zlib/tests/gzseek_variation5.phpt index e59a3fb88d7ba..41d5c777a6883 100644 --- a/ext/zlib/tests/gzseek_variation5.phpt +++ b/ext/zlib/tests/gzseek_variation5.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_CUR when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation6.phpt b/ext/zlib/tests/gzseek_variation6.phpt index e7f49f5fd72f8..1c2e6de562ba7 100644 --- a/ext/zlib/tests/gzseek_variation6.phpt +++ b/ext/zlib/tests/gzseek_variation6.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_END when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzseek_variation7.phpt b/ext/zlib/tests/gzseek_variation7.phpt index 67c0ecf074db9..1198e56ced57b 100644 --- a/ext/zlib/tests/gzseek_variation7.phpt +++ b/ext/zlib/tests/gzseek_variation7.phpt @@ -3,7 +3,7 @@ Test function gzseek() by calling it with SEEK_END when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gztell_basic.phpt b/ext/zlib/tests/gztell_basic.phpt index acd0829360bb8..063bae63bb6a2 100644 --- a/ext/zlib/tests/gztell_basic.phpt +++ b/ext/zlib/tests/gztell_basic.phpt @@ -3,7 +3,7 @@ Test function gztell() by calling it with its expected arguments when reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gztell_basic2.phpt b/ext/zlib/tests/gztell_basic2.phpt index 13ac183d46519..b9d9eb083738d 100644 --- a/ext/zlib/tests/gztell_basic2.phpt +++ b/ext/zlib/tests/gztell_basic2.phpt @@ -3,7 +3,7 @@ Test function gztell() by calling it with its expected arguments when writing --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzuncompress_basic1.phpt b/ext/zlib/tests/gzuncompress_basic1.phpt index d82d7069e3a2d..c46e8b35ebd99 100644 --- a/ext/zlib/tests/gzuncompress_basic1.phpt +++ b/ext/zlib/tests/gzuncompress_basic1.phpt @@ -3,7 +3,7 @@ Test gzuncompress() function : basic functionality --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzuncompress_error1.phpt b/ext/zlib/tests/gzuncompress_error1.phpt index 5390cce93832d..a93de5b054b18 100644 --- a/ext/zlib/tests/gzuncompress_error1.phpt +++ b/ext/zlib/tests/gzuncompress_error1.phpt @@ -3,7 +3,7 @@ Test gzuncompress() function : error conditions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzwrite_basic.phpt b/ext/zlib/tests/gzwrite_basic.phpt index bdea57deff856..699b2f49937d2 100644 --- a/ext/zlib/tests/gzwrite_basic.phpt +++ b/ext/zlib/tests/gzwrite_basic.phpt @@ -3,7 +3,7 @@ Test function gzwrite() by calling it with its expected arguments --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzwrite_error2.phpt b/ext/zlib/tests/gzwrite_error2.phpt index a4e4fa4958d6a..009cb4d7d28d8 100644 --- a/ext/zlib/tests/gzwrite_error2.phpt +++ b/ext/zlib/tests/gzwrite_error2.phpt @@ -3,7 +3,7 @@ Test function gzwrite() by calling it invalid lengths --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/gzwrite_variation1.phpt b/ext/zlib/tests/gzwrite_variation1.phpt index 563702e4bdcc5..540a87985a109 100644 --- a/ext/zlib/tests/gzwrite_variation1.phpt +++ b/ext/zlib/tests/gzwrite_variation1.phpt @@ -3,7 +3,7 @@ Test function gzwrite() by calling it when file is opened for reading --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/readgzfile_variation15.phpt b/ext/zlib/tests/readgzfile_variation15.phpt index 1a96fdb429090..749087f6ce66e 100644 --- a/ext/zlib/tests/readgzfile_variation15.phpt +++ b/ext/zlib/tests/readgzfile_variation15.phpt @@ -3,7 +3,7 @@ Test readgzfile() function : variation: use include path (relative directories i --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_copy_basic.phpt b/ext/zlib/tests/zlib_scheme_copy_basic.phpt index 5a35164cf1c9c..9c6becb4c75f9 100644 --- a/ext/zlib/tests/zlib_scheme_copy_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_copy_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the copy function: compressed to compressed --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_copy_variation1.phpt b/ext/zlib/tests/zlib_scheme_copy_variation1.phpt index a5e145faa3fcc..c96e2bee290be 100644 --- a/ext/zlib/tests/zlib_scheme_copy_variation1.phpt +++ b/ext/zlib/tests/zlib_scheme_copy_variation1.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the copy function: compressed to uncompressed --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_copy_variation2.phpt b/ext/zlib/tests/zlib_scheme_copy_variation2.phpt index 8492862892a27..829351846bce5 100644 --- a/ext/zlib/tests/zlib_scheme_copy_variation2.phpt +++ b/ext/zlib/tests/zlib_scheme_copy_variation2.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the copy function: uncompressed to compressed --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_dir_basic.phpt b/ext/zlib/tests/zlib_scheme_dir_basic.phpt index f0e155e899366..014243d5749f2 100644 --- a/ext/zlib/tests/zlib_scheme_dir_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_dir_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the directory functions --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_file_basic.phpt b/ext/zlib/tests/zlib_scheme_file_basic.phpt index 5d73cf16c2944..cb697f44f0718 100644 --- a/ext/zlib/tests/zlib_scheme_file_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the file --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt b/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt index b02a1bffe98c6..615d3c5d25ecb 100644 --- a/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_get_contents_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the file_get_contents --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt b/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt index 51a52c9808efc..7ed77b36b3381 100644 --- a/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_put_contents_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the file_get_contents --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt b/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt index 007a4a50229e2..73047310214e7 100644 --- a/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_file_read_file_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the file_get_contents --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_fopen_basic.phpt b/ext/zlib/tests/zlib_scheme_fopen_basic.phpt index c6508deaa047b..e8c6492024f5f 100644 --- a/ext/zlib/tests/zlib_scheme_fopen_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_fopen_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the fopen --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt b/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt index 8bed54ebaa7c6..093b137c6e7d1 100644 --- a/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt +++ b/ext/zlib/tests/zlib_scheme_fopen_variation1.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the fopen on a file scheme --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_rename_basic.phpt b/ext/zlib/tests/zlib_scheme_rename_basic.phpt index b58a09f89e26b..e67970d332cfd 100644 --- a/ext/zlib/tests/zlib_scheme_rename_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_rename_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the unlink function --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_stat_basic.phpt b/ext/zlib/tests/zlib_scheme_stat_basic.phpt index 31d08866ba307..fa48454db523c 100644 --- a/ext/zlib/tests/zlib_scheme_stat_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_stat_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the unlink function --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_stat_basic2.phpt b/ext/zlib/tests/zlib_scheme_stat_basic2.phpt index 23c59f8ff3ea4..c2cfca723a91e 100644 --- a/ext/zlib/tests/zlib_scheme_stat_basic2.phpt +++ b/ext/zlib/tests/zlib_scheme_stat_basic2.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the unlink function --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_scheme_unlink_basic.phpt b/ext/zlib/tests/zlib_scheme_unlink_basic.phpt index ca21637ed104a..c5c4eabb466ef 100644 --- a/ext/zlib/tests/zlib_scheme_unlink_basic.phpt +++ b/ext/zlib/tests/zlib_scheme_unlink_basic.phpt @@ -3,7 +3,7 @@ Test compress.zlib:// scheme with the unlink function --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_wrapper_fflush_basic.phpt b/ext/zlib/tests/zlib_wrapper_fflush_basic.phpt index 6911aabe69e8d..54d0e37860d5d 100644 --- a/ext/zlib/tests/zlib_wrapper_fflush_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_fflush_basic.phpt @@ -3,7 +3,7 @@ Test function fflush() on a zlib stream wrapper --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_wrapper_flock_basic.phpt b/ext/zlib/tests/zlib_wrapper_flock_basic.phpt index 41c651c50f991..6d3f9d6237920 100644 --- a/ext/zlib/tests/zlib_wrapper_flock_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_flock_basic.phpt @@ -3,7 +3,7 @@ Test function stream_get_meta_data on a zlib stream --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt b/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt index 20af263e5a038..eaa9a124db483 100644 --- a/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_fstat_basic.phpt @@ -3,7 +3,7 @@ Test function fstat() on zlib wrapper --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt b/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt index 2ace80d21cd9a..07b3917213d8b 100644 --- a/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_ftruncate_basic.phpt @@ -3,7 +3,7 @@ Test function ftruncate() on zlib wrapper by calling it with its expected argume --SKIPIF-- --FILE-- diff --git a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt index 8476b2923a0c2..815854b21e1a5 100644 --- a/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt +++ b/ext/zlib/tests/zlib_wrapper_meta_data_basic.phpt @@ -3,7 +3,7 @@ Test function stream_get_meta_data on a zlib stream --SKIPIF-- --FILE-- diff --git a/sapi/cgi/tests/003.phpt b/sapi/cgi/tests/003.phpt index 00c59c72784a0..ac3f6aa8e6386 100644 --- a/sapi/cgi/tests/003.phpt +++ b/sapi/cgi/tests/003.phpt @@ -4,7 +4,7 @@ strip comments and whitespace with -w --FILE-- diff --git a/sapi/cli/tests/003-2.phpt b/sapi/cli/tests/003-2.phpt index 71ef7163bef39..3a88b2a9a3aa1 100644 --- a/sapi/cli/tests/003-2.phpt +++ b/sapi/cli/tests/003-2.phpt @@ -4,7 +4,7 @@ defining INI options with -d (as 2nd arg) --FILE-- diff --git a/sapi/cli/tests/003.phpt b/sapi/cli/tests/003.phpt index 6584e2c7bef21..63e812d4a7cd7 100644 --- a/sapi/cli/tests/003.phpt +++ b/sapi/cli/tests/003.phpt @@ -4,7 +4,7 @@ defining INI options with -d --FILE-- diff --git a/sapi/cli/tests/006.phpt b/sapi/cli/tests/006.phpt index f3443b7475e64..77a5667bda82f 100644 --- a/sapi/cli/tests/006.phpt +++ b/sapi/cli/tests/006.phpt @@ -4,10 +4,10 @@ show information about extension --INI-- diff --git a/sapi/cli/tests/007.phpt b/sapi/cli/tests/007.phpt index 94ea6fd247457..73faa334237cf 100644 --- a/sapi/cli/tests/007.phpt +++ b/sapi/cli/tests/007.phpt @@ -4,7 +4,7 @@ strip comments and whitespace with -w --FILE-- diff --git a/sapi/cli/tests/008.phpt b/sapi/cli/tests/008.phpt index c96170d4979b6..c3acf6b86330d 100644 --- a/sapi/cli/tests/008.phpt +++ b/sapi/cli/tests/008.phpt @@ -4,7 +4,7 @@ execute a file with -f --FILE-- diff --git a/sapi/cli/tests/010-2.phpt b/sapi/cli/tests/010-2.phpt index af998351bb76c..1780c3ffd6226 100644 --- a/sapi/cli/tests/010-2.phpt +++ b/sapi/cli/tests/010-2.phpt @@ -4,7 +4,7 @@ executing a code with -R --FILE-- diff --git a/sapi/cli/tests/010.phpt b/sapi/cli/tests/010.phpt index 01b35991369e1..d06007bd55e98 100644 --- a/sapi/cli/tests/010.phpt +++ b/sapi/cli/tests/010.phpt @@ -4,7 +4,7 @@ executing a file with -F --FILE-- diff --git a/sapi/cli/tests/013.phpt b/sapi/cli/tests/013.phpt index 3ca2ba833caa9..0684b8d0573cf 100644 --- a/sapi/cli/tests/013.phpt +++ b/sapi/cli/tests/013.phpt @@ -4,7 +4,7 @@ running PHP code before and after processing input lines with -B and -E --FILE-- diff --git a/sapi/cli/tests/015.phpt b/sapi/cli/tests/015.phpt index 5a5e6c5190d25..b64a5f0d50fae 100644 --- a/sapi/cli/tests/015.phpt +++ b/sapi/cli/tests/015.phpt @@ -4,7 +4,7 @@ CLI long options --FILE-- diff --git a/sapi/cli/tests/016.phpt b/sapi/cli/tests/016.phpt index bbba579ec2b24..bf23affe818e9 100644 --- a/sapi/cli/tests/016.phpt +++ b/sapi/cli/tests/016.phpt @@ -4,7 +4,7 @@ CLI -a and readline --FILE-- diff --git a/sapi/cli/tests/017.phpt b/sapi/cli/tests/017.phpt index 6c9a792476737..344daa7408b59 100644 --- a/sapi/cli/tests/017.phpt +++ b/sapi/cli/tests/017.phpt @@ -4,7 +4,7 @@ CLI -a and libedit --FILE-- diff --git a/sapi/cli/tests/019.phpt b/sapi/cli/tests/019.phpt index 2b8c0f007ecbc..e8404d835e5e7 100644 --- a/sapi/cli/tests/019.phpt +++ b/sapi/cli/tests/019.phpt @@ -4,7 +4,7 @@ CLI php -i --FILE-- diff --git a/sapi/cli/tests/020.phpt b/sapi/cli/tests/020.phpt index 001cf62a3836d..fb7bcb4e7b5f6 100644 --- a/sapi/cli/tests/020.phpt +++ b/sapi/cli/tests/020.phpt @@ -4,7 +4,7 @@ CLI php --ri --FILE-- diff --git a/sapi/cli/tests/021.phpt b/sapi/cli/tests/021.phpt index a5d97c326d563..837f64109d03d 100644 --- a/sapi/cli/tests/021.phpt +++ b/sapi/cli/tests/021.phpt @@ -4,7 +4,7 @@ CLI shell shebang 127) { diff --git a/sapi/cli/tests/argv_mb_bug77111.phpt b/sapi/cli/tests/argv_mb_bug77111.phpt index a2bae24dc3ead..0ed6204b89d79 100644 --- a/sapi/cli/tests/argv_mb_bug77111.phpt +++ b/sapi/cli/tests/argv_mb_bug77111.phpt @@ -5,12 +5,12 @@ Bug #77111 php-win.exe corrupts unicode symbols from cli parameters 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"); } ?> diff --git a/sapi/cli/tests/bug44564.phpt b/sapi/cli/tests/bug44564.phpt index 7dca62a7e8e9f..6ef5b9f9507f9 100644 --- a/sapi/cli/tests/bug44564.phpt +++ b/sapi/cli/tests/bug44564.phpt @@ -3,7 +3,7 @@ Bug #44564 (escapeshellarg removes UTF-8 multi-byte characters) --SKIPIF-- --FILE-- diff --git a/sapi/cli/tests/bug64529.phpt b/sapi/cli/tests/bug64529.phpt index ff3e3029e63db..7350cd2046169 100644 --- a/sapi/cli/tests/bug64529.phpt +++ b/sapi/cli/tests/bug64529.phpt @@ -3,14 +3,14 @@ Bug #64529 (Ran out of opcode space) --SKIPIF-- --FILE-- diff --git a/sapi/cli/tests/bug64544.phpt b/sapi/cli/tests/bug64544.phpt index 33a6e16a10c8d..87e8eda64ae0f 100644 --- a/sapi/cli/tests/bug64544.phpt +++ b/sapi/cli/tests/bug64544.phpt @@ -3,7 +3,7 @@ Bug #64544 (Valgrind warnings after using putenv) --SKIPIF-- --FILE-- diff --git a/sapi/cli/tests/bug65275.inc b/sapi/cli/tests/bug65275.inc index 6b8a2ad948e56..addc026322dc5 100644 --- a/sapi/cli/tests/bug65275.inc +++ b/sapi/cli/tests/bug65275.inc @@ -1,7 +1,7 @@ =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')) { diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 4629f94986fcf..54d06a84c7703 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -482,7 +482,8 @@ static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) || opcode == ZEND_DECLARE_CONST || opcode == ZEND_DECLARE_CLASS || opcode == ZEND_DECLARE_FUNCTION || opcode == ZEND_DECLARE_CLASS_DELAYED || opcode == ZEND_DECLARE_ANON_CLASS || opcode == ZEND_FAST_RET || opcode == ZEND_TICKS - || opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END || opcode == ZEND_EXT_NOP || opcode == ZEND_BIND_GLOBAL + || opcode == ZEND_EXT_STMT || opcode == ZEND_EXT_FCALL_BEGIN || opcode == ZEND_EXT_FCALL_END + || opcode == ZEND_BIND_GLOBAL ; } diff --git a/scripts/dev/tidy.php b/scripts/dev/tidy.php index 3829f9092ec23..7ec9f7902d662 100644 --- a/scripts/dev/tidy.php +++ b/scripts/dev/tidy.php @@ -117,7 +117,7 @@ function transformTestCode(string $code, callable $transformer): string { } return preg_replace_callback( - '/(--FILE--)(.+?)(--[A-Z_]+--)/s', + '/(--(?:FILE|SKIPIF|CLEAN)--)(.+?)(--[A-Z_]+--)/s', function(array $matches) use($transformer) { return $matches[1] . $transformer($matches[2]) . $matches[3]; }, diff --git a/tests/classes/autoload_001.phpt b/tests/classes/autoload_001.phpt index cdea16f689bb7..7fe6757d6859e 100644 --- a/tests/classes/autoload_001.phpt +++ b/tests/classes/autoload_001.phpt @@ -2,7 +2,7 @@ ZE2 Autoload and class_exists --SKIPIF-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- --FILE-- diff --git a/tests/lang/bug30638.phpt b/tests/lang/bug30638.phpt index 24e6609498c21..3eb2c35241442 100644 --- a/tests/lang/bug30638.phpt +++ b/tests/lang/bug30638.phpt @@ -3,7 +3,7 @@ Bug #30638 (localeconv returns wrong LC_NUMERIC settings) (ok to fail on MacOS X --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt index 86cf631110c2d..94e692d01f292 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/ --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt index 4c0f5f9909937..11caa432d13e9 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/ --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt index 01efb3bb4e36f..fc0429c4b0505 100644 --- a/tests/output/sapi_windows_vt100_support_winko_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_in-out.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on older Windows versions with redirected STDIN/ --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt index 09d3d8f0be40e..ee34be988b0d9 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on older Windows versions with redirected STDOUT --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winko_out.phpt b/tests/output/sapi_windows_vt100_support_winko_out.phpt index 65958ae19c1f0..3241ba352abd9 100644 --- a/tests/output/sapi_windows_vt100_support_winko_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winko_out.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on older Windows versions with redirected STDOUT --SKIPIF-- = 0) { - echo "skip Only for Windows systems < 10.0.10586"; + echo "skip Only for Windows systems < 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_err.phpt b/tests/output/sapi_windows_vt100_support_winok_err.phpt index 01a31a6b927e1..4d7543fdda1ae 100644 --- a/tests/output/sapi_windows_vt100_support_winok_err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDERR --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt index d36d79c8dcbf3..e08d558e25acd 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/ --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt index 16066046510bb..285a72f936366 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/ --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt index f67942f603f7a..a84b36534747d 100644 --- a/tests/output/sapi_windows_vt100_support_winok_in-out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_in-out.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDIN/ --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt index ebc6bcb120566..f3f49aa618f46 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out-err.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out-err.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDOUT --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/sapi_windows_vt100_support_winok_out.phpt b/tests/output/sapi_windows_vt100_support_winok_out.phpt index 94a5f20a1bfb9..7fc5ae142b6c3 100644 --- a/tests/output/sapi_windows_vt100_support_winok_out.phpt +++ b/tests/output/sapi_windows_vt100_support_winok_out.phpt @@ -3,15 +3,15 @@ Test sapi_windows_vt100_support on newer Windows versions with redirected STDOUT --SKIPIF-- = 10.0.10586"; + echo "skip Only for Windows systems >= 10.0.10586"; } ?> --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_err.phpt b/tests/output/stream_isatty_err.phpt index e7c10383506d3..c0487392810bd 100644 --- a/tests/output/stream_isatty_err.phpt +++ b/tests/output/stream_isatty_err.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDERR --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_in-err.phpt b/tests/output/stream_isatty_in-err.phpt index 73514955d43c9..8c10baae8039b 100644 --- a/tests/output/stream_isatty_in-err.phpt +++ b/tests/output/stream_isatty_in-err.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDIN/STDERR --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_in-out-err.phpt b/tests/output/stream_isatty_in-out-err.phpt index 9b65e8861b86b..851327ead8024 100644 --- a/tests/output/stream_isatty_in-out-err.phpt +++ b/tests/output/stream_isatty_in-out-err.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDIN/STDOUT/STDERR --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_in-out.phpt b/tests/output/stream_isatty_in-out.phpt index c2bb346854f4f..19fa8552b8b0a 100644 --- a/tests/output/stream_isatty_in-out.phpt +++ b/tests/output/stream_isatty_in-out.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDIN/STDOUT --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_out-err.phpt b/tests/output/stream_isatty_out-err.phpt index dc113a972060e..e080810ae8af0 100644 --- a/tests/output/stream_isatty_out-err.phpt +++ b/tests/output/stream_isatty_out-err.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDOUT/STDERR --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/output/stream_isatty_out.phpt b/tests/output/stream_isatty_out.phpt index f18c986c5abf6..80db5095103dd 100644 --- a/tests/output/stream_isatty_out.phpt +++ b/tests/output/stream_isatty_out.phpt @@ -3,7 +3,7 @@ Test stream_isatty with redirected STDOUT --SKIPIF-- --CAPTURE_STDIO-- diff --git a/tests/run-test/bug75042.phpt b/tests/run-test/bug75042.phpt index af3005372bbb7..a7979d6b5ed6e 100644 --- a/tests/run-test/bug75042.phpt +++ b/tests/run-test/bug75042.phpt @@ -4,7 +4,7 @@ phpt EXTENSIONS directive with shared module