Fix #78880: Spelling error report

We fix the most often occuring typos according to a recent codespell
report[1] in tests, code comments and documentation.

[1] <https://fossies.org/linux/test/php-src-master-f8f48ce.191129.tar.gz/codespell.html>.
This commit is contained in:
Christoph M. Becker 2019-12-21 11:58:00 +01:00
parent eff56f83af
commit dabc28d182
168 changed files with 781 additions and 781 deletions

View file

@ -60,7 +60,7 @@ SINCE: 5.3
-------------------------------------------------------------------------------
EXTENSION: phpdbg
PRIMARY MAINTAINER: Joe Watkins <krakjoe@php.net>, Bob Weinand <bwoebi@php.net>
MAINTENANCE: Unkown
MAINTENANCE: Unknown
STATUS: 5.6
-------------------------------------------------------------------------------
@ -431,7 +431,7 @@ STATUS: Working
SINCE: 4.0.2
-------------------------------------------------------------------------------
EXTENSION: readline
PRIMARY MAINTAINER: Unkown
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
@ -480,17 +480,17 @@ STATUS: Working
SINCE: 5.0.0
-------------------------------------------------------------------------------
EXTENSION: sysvmsg
PRIMARY MAINTAINER: Unkown
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sysvsem
PRIMARY MAINTAINER: Unkown
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------
EXTENSION: sysvshm
PRIMARY MAINTAINER: Unkown
PRIMARY MAINTAINER: Unknown
MAINTENANCE: Unknown
STATUS: Working
-------------------------------------------------------------------------------

View file

@ -13,7 +13,7 @@ function foo($ex = NULL) {
if ($ex) throw $ex;
}
} catch (Exception $e) {
var_dump("catched");
var_dump("caught");
if ($ex) return "return1";
} finally {
var_dump("finally2");
@ -34,6 +34,6 @@ string(8) "finally2"
string(5) "label"
string(7) "return2"
string(8) "finally1"
string(7) "catched"
string(6) "caught"
string(8) "finally2"
string(7) "return1"

View file

@ -20,7 +20,7 @@ function foo($ret = FALSE) {
} catch (Exception $e) {
goto local;
local:
var_dump("catched");
var_dump("caught");
if ($ret) return "return";
} finally {
var_dump("finally2");
@ -36,11 +36,11 @@ var_dump(foo(true));
?>
--EXPECT--
string(8) "finally1"
string(7) "catched"
string(6) "caught"
string(8) "finally2"
string(5) "label"
NULL
string(8) "finally1"
string(7) "catched"
string(6) "caught"
string(8) "finally2"
string(6) "return"

View file

@ -1,5 +1,5 @@
--TEST--
Testing clone on objects whoose class derived from DateTimeZone class
Testing clone on objects whose class derived from DateTimeZone class
--FILE--
<?php
//Set the default time zone
@ -15,7 +15,7 @@ class DateTimeZoneExt2 extends DateTimeZoneExt1 {
public $property4 = 10.5;
}
echo "*** Testing clone on objects whoose class derived from DateTimeZone class ***\n";
echo "*** Testing clone on objects whose class derived from DateTimeZone class ***\n";
$d1 = new DateTimeZoneExt1("Europe/London");
var_dump($d1);
@ -29,7 +29,7 @@ var_dump($d2_clone);
?>
--EXPECTF--
*** Testing clone on objects whoose class derived from DateTimeZone class ***
*** Testing clone on objects whose class derived from DateTimeZone class ***
object(DateTimeZoneExt1)#%d (4) {
["property1"]=>
int(99)

View file

@ -1,5 +1,5 @@
--TEST--
Test clone of objects whoose class derived from DateTime class
Test clone of objects whose class derived from DateTime class
--FILE--
<?php
//Set the default time zone
@ -16,7 +16,7 @@ class DateTimeExt2 extends DateTimeExt1 {
public $property4 = 10.5;
}
echo "*** Testing clone on objects whoose class derived from DateTime class ***\n";
echo "*** Testing clone on objects whose class derived from DateTime class ***\n";
$d1 = new DateTimeExt1("2009-02-03 12:34:41 GMT");
var_dump($d1);
@ -29,7 +29,7 @@ $d2_clone = clone $d2;
var_dump($d2_clone);
?>
--EXPECTF--
*** Testing clone on objects whoose class derived from DateTime class ***
*** Testing clone on objects whose class derived from DateTime class ***
object(DateTimeExt1)#%d (5) {
["property1"]=>
int(99)

View file

@ -54,7 +54,7 @@ static zend_bool needs_pi(const zend_op_array *op_array, zend_dfg *dfg, zend_ssa
return 0;
}
/* Make sure that both sucessors of the from block aren't the same. Pi nodes are associated
/* Make sure that both successors of the from block aren't the same. Pi nodes are associated
* with predecessor blocks, so we can't distinguish which edge the pi belongs to. */
from_block = &ssa->cfg.blocks[from];
ZEND_ASSERT(from_block->successors_count == 2);

View file

@ -889,7 +889,7 @@ decode_operand(struct ud *u,
/*
* decode_operands
*
* Disassemble upto 3 operands of the current instruction being
* Disassemble up to 3 operands of the current instruction being
* disassembled. By the end of the function, the operand fields
* of the ud structure will have been filled.
*/

View file

@ -8852,7 +8852,7 @@ static uint32_t zend_get_known_property_offset(zend_class_entry *ce, zend_string
if (ce->ce_flags & ZEND_ACC_INHERITED) {
if (!ce->parent) {
/* propery offests may be changed by inheritance */
/* property offests may be changed by inheritance */
return ZEND_WRONG_PROPERTY_OFFSET;
} else {
zend_class_entry *parent = ce->parent;

View file

@ -16,7 +16,7 @@ MySQLPDOTest::skip();
class myclass implements Serializable {
private static $instance = null;
protected $myprotected = 'a protected propery';
protected $myprotected = 'a protected property';
// Good old magic stuff
private function __construct($caller = NULL) {
@ -129,14 +129,14 @@ Unserializing the previously serialized object...
myclass::unserialize('Data from serialize')
object(myclass)#4 (1) {
["myprotected":protected]=>
string(19) "a protected propery"
string(20) "a protected property"
}
Using PDO::FETCH_CLASS|PDO::FETCH_SERIALIZE to fetch the object from DB and unserialize it...
myclass::unserialize('C:7:"myclass":19:{Data from serialize}')
object(myclass)#%d (1) {
["myprotected":protected]=>
string(19) "a protected propery"
string(20) "a protected property"
}
Using PDO::FETCH_CLASS to fetch the object from DB and unserialize it...
@ -144,7 +144,7 @@ myclass::__set(myobj, 'C:7:"myclass":19:{Data from serialize}')
myclass::__construct(PDO shall call __construct())
object(myclass)#%d (2) {
["myprotected":protected]=>
string(19) "a protected propery"
string(20) "a protected property"
["myobj"]=>
string(38) "C:7:"myclass":19:{Data from serialize}"
}

View file

@ -12,7 +12,7 @@ require 'ext/pdo/tests/pdo_test.inc';
$db = PDOTest::test_factory('ext/pdo_oci/tests/common.phpt');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
$rs = $db->query('select blah from a_table_that_doesnt_exist');
$rs = $db->query('select blah from a_table_that_does_not_exist');
var_dump($rs);
var_dump($db->errorInfo());
--EXPECTF--

View file

@ -70,7 +70,7 @@ $r = pg_query($db, "SELECT * FROM tmp_statistics");
while (false != ($row = pg_fetch_row($r))) {
var_dump($row);
}
echo $errors, " errors catched\n";
echo $errors, " errors caught\n";
pg_query($db, "DROP TABLE tmp_statistics");
pg_close($db);
@ -191,4 +191,4 @@ array(2) {
[1]=>
string(19) "2001:4f8:3:ba::/112"
}
7 errors catched
7 errors caught

View file

@ -1,5 +1,5 @@
--TEST--
ReflectionMethod::__toString() tests (overriden method)
ReflectionMethod::__toString() tests (overridden method)
--FILE--
<?php
class Foo {

View file

@ -20,7 +20,7 @@ foreach($classes as $class) {
echo "Reflecting on class $class: \n";
$rc = new ReflectionClass($class);
var_dump($rc->getConstant('a'));
var_dump($rc->getConstant('doesntexist'));
var_dump($rc->getConstant('doesnotexist'));
}
?>
--EXPECT--

View file

@ -37,9 +37,9 @@ foreach($classes as $class) {
var_dump($rc->getMethod("s"));
echo " --> Check for F(): ";
var_dump($rc->getMethod("F"));
echo " --> Check for doesntExist(): ";
echo " --> Check for doesNotExist(): ";
try {
var_dump($rc->getMethod("doesntExist"));
var_dump($rc->getMethod("doesNotExist"));
} catch (Exception $e) {
echo $e->getMessage() . "\n";
}
@ -65,7 +65,7 @@ Reflecting on class pubf:
["class"]=>
string(4) "pubf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist
Reflecting on class subpubf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@ -85,7 +85,7 @@ Reflecting on class subpubf:
["class"]=>
string(4) "pubf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist
Reflecting on class protf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@ -105,7 +105,7 @@ Reflecting on class protf:
["class"]=>
string(5) "protf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist
Reflecting on class subprotf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@ -125,7 +125,7 @@ Reflecting on class subprotf:
["class"]=>
string(5) "protf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist
Reflecting on class privf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@ -145,7 +145,7 @@ Reflecting on class privf:
["class"]=>
string(5) "privf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist
Reflecting on class subprivf:
--> Check for f(): object(ReflectionMethod)#%d (2) {
["name"]=>
@ -165,4 +165,4 @@ Reflecting on class subprivf:
["class"]=>
string(5) "privf"
}
--> Check for doesntExist(): Method doesntExist does not exist
--> Check for doesNotExist(): Method doesNotExist does not exist

View file

@ -50,8 +50,8 @@ foreach($classes as $class) {
echo $e->getMessage() . "\n";
}
try {
echo " --> Check for doesntExist: ";
var_dump($rc->getProperty("doesntExist"));
echo " --> Check for doesNotExist: ";
var_dump($rc->getProperty("doesNotExist"));
} catch (exception $e) {
echo $e->getMessage() . "\n";
}
@ -73,7 +73,7 @@ Reflecting on class pubf:
string(4) "pubf"
}
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist
Reflecting on class subpubf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@ -88,7 +88,7 @@ Reflecting on class subpubf:
string(4) "pubf"
}
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist
Reflecting on class protf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@ -103,7 +103,7 @@ Reflecting on class protf:
string(5) "protf"
}
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist
Reflecting on class subprotf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@ -118,7 +118,7 @@ Reflecting on class subprotf:
string(5) "protf"
}
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist
Reflecting on class privf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@ -133,7 +133,7 @@ Reflecting on class privf:
string(5) "privf"
}
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist
Reflecting on class subprivf:
--> Check for s: object(ReflectionProperty)#%d (2) {
["name"]=>
@ -143,4 +143,4 @@ Reflecting on class subprivf:
}
--> Check for a: Property a does not exist
--> Check for A: Property A does not exist
--> Check for doesntExist: Property doesntExist does not exist
--> Check for doesNotExist: Property doesNotExist does not exist

View file

@ -70,7 +70,7 @@ showInfo("privB");
showInfo("pubC");
showInfo("protC");
showInfo("privC");
showInfo("doesntExist");
showInfo("doesNotExist");
showInfo("A::pubC");
showInfo("A::protC");
@ -89,9 +89,9 @@ showInfo("C::privC");
showInfo("X::pubC");
showInfo("X::protC");
showInfo("X::privC");
showInfo("X::doesntExist");
showInfo("X::doesNotExist");
showInfo("doesntexist::doesntExist");
showInfo("doesNotexist::doesNotExist");
?>
--EXPECTF--
@ -155,8 +155,8 @@ object(ReflectionProperty)#%d (2) {
string(1) "C"
}
Cannot access non-public member C::$privC
--- (Reflecting on doesntExist) ---
Property doesntExist does not exist
--- (Reflecting on doesNotExist) ---
Property doesNotExist does not exist
--- (Reflecting on A::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@ -245,7 +245,7 @@ Fully qualified property name X::pubC does not specify a base class of C
Fully qualified property name X::protC does not specify a base class of C
--- (Reflecting on X::privC) ---
Fully qualified property name X::privC does not specify a base class of C
--- (Reflecting on X::doesntExist) ---
Fully qualified property name X::doesntExist does not specify a base class of C
--- (Reflecting on doesntexist::doesntExist) ---
Class doesntexist does not exist
--- (Reflecting on X::doesNotExist) ---
Fully qualified property name X::doesNotExist does not specify a base class of C
--- (Reflecting on doesNotexist::doesNotExist) ---
Class doesnotexist does not exist

View file

@ -70,7 +70,7 @@ showInfo("privB");
showInfo("pubC");
showInfo("protC");
showInfo("privC");
showInfo("doesntExist");
showInfo("doesNotExist");
showInfo("A::pubC");
showInfo("A::protC");
@ -89,9 +89,9 @@ showInfo("C::privC");
showInfo("X::pubC");
showInfo("X::protC");
showInfo("X::privC");
showInfo("X::doesntExist");
showInfo("X::doesNotExist");
showInfo("doesntexist::doesntExist");
showInfo("doesNotexist::doesNotExist");
?>
--EXPECTF--
@ -155,8 +155,8 @@ object(ReflectionProperty)#%d (2) {
string(1) "C"
}
Cannot access non-public member C::$privC
--- (Reflecting on doesntExist) ---
Property doesntExist does not exist
--- (Reflecting on doesNotExist) ---
Property doesNotExist does not exist
--- (Reflecting on A::pubC) ---
object(ReflectionProperty)#%d (2) {
["name"]=>
@ -245,7 +245,7 @@ Fully qualified property name X::pubC does not specify a base class of C
Fully qualified property name X::protC does not specify a base class of C
--- (Reflecting on X::privC) ---
Fully qualified property name X::privC does not specify a base class of C
--- (Reflecting on X::doesntExist) ---
Fully qualified property name X::doesntExist does not specify a base class of C
--- (Reflecting on doesntexist::doesntExist) ---
Class doesntexist does not exist
--- (Reflecting on X::doesNotExist) ---
Fully qualified property name X::doesNotExist does not specify a base class of C
--- (Reflecting on doesNotexist::doesNotExist) ---
Class doesnotexist does not exist

View file

@ -19,14 +19,14 @@ var_dump($rc->hasConstant("myConst"));
echo "Check existing constant, different case: ";
var_dump($rc->hasConstant("MyCoNsT"));
echo "Check absent constant: ";
var_dump($rc->hasConstant("doesntExist"));
var_dump($rc->hasConstant("doesNotExist"));
$rd = new ReflectionClass("D");
echo "Check inherited constant: ";
var_dump($rd->hasConstant("myConst"));
echo "Check absent constant: ";
var_dump($rd->hasConstant("doesntExist"));
var_dump($rd->hasConstant("doesNotExist"));
?>
--EXPECT--
Check existing constant: bool(true)

View file

@ -37,8 +37,8 @@ foreach($classes as $class) {
var_dump($rc->hasMethod("s"));
echo " --> Check for F(): ";
var_dump($rc->hasMethod("F"));
echo " --> Check for doesntExist(): ";
var_dump($rc->hasMethod("doesntExist"));
echo " --> Check for doesNotExist(): ";
var_dump($rc->hasMethod("doesNotExist"));
}
?>
--EXPECT--
@ -46,30 +46,30 @@ Reflecting on class pubf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)
Reflecting on class subpubf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)
Reflecting on class protf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)
Reflecting on class subprotf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)
Reflecting on class privf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)
Reflecting on class subprivf:
--> Check for f(): bool(true)
--> Check for s(): bool(true)
--> Check for F(): bool(true)
--> Check for doesntExist(): bool(false)
--> Check for doesNotExist(): bool(false)

View file

@ -37,8 +37,8 @@ foreach($classes as $class) {
var_dump($rc->hasProperty("a"));
echo " --> Check for A: ";
var_dump($rc->hasProperty("A"));
echo " --> Check for doesntExist: ";
var_dump($rc->hasProperty("doesntExist"));
echo " --> Check for doesNotExist: ";
var_dump($rc->hasProperty("doesNotExist"));
}
?>
--EXPECT--
@ -46,29 +46,29 @@ Reflecting on class pubf:
--> Check for s: bool(true)
--> Check for a: bool(true)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)
Reflecting on class subpubf:
--> Check for s: bool(true)
--> Check for a: bool(true)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)
Reflecting on class protf:
--> Check for s: bool(true)
--> Check for a: bool(true)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)
Reflecting on class subprotf:
--> Check for s: bool(true)
--> Check for a: bool(true)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)
Reflecting on class privf:
--> Check for s: bool(true)
--> Check for a: bool(true)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)
Reflecting on class subprivf:
--> Check for s: bool(true)
--> Check for a: bool(false)
--> Check for A: bool(false)
--> Check for doesntExist: bool(false)
--> Check for doesNotExist: bool(false)

View file

@ -20,7 +20,7 @@ foreach($classes as $class) {
echo "Reflecting on instance of class $class: \n";
$rc = new ReflectionObject(new $class);
var_dump($rc->getConstant('a'));
var_dump($rc->getConstant('doesntexist'));
var_dump($rc->getConstant('doesNotexist'));
}
?>
--EXPECT--

View file

@ -1,5 +1,5 @@
--TEST--
Bug #53366 (Reflection doesnt get dynamic property value from getProperty())
Bug #53366 (Reflection doesn't get dynamic property value from getProperty())
--FILE--
<?php

View file

@ -1,5 +1,5 @@
--TEST--
SimpleXML: overriden count() method
SimpleXML: overridden count() method
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
--FILE--

View file

@ -1,5 +1,5 @@
--TEST--
SPL: SimpleXMLIterator and overriden count()
SPL: SimpleXMLIterator and overridden count()
--SKIPIF--
<?php
if (!extension_loaded('simplexml')) print 'skip';

View file

@ -1,5 +1,5 @@
--TEST--
Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoints)
Request #50698_1 (SoapClient should handle wsdls with some incompatible endpoints)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--

View file

@ -1,5 +1,5 @@
--TEST--
Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatible and incompatiable endpoints.)
Request #50698_2 (SoapClient should handle wsdls with some incompatible endpoints -- EDGECASE: Large mix of compatible and incompatible endpoints.)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--

View file

@ -1,5 +1,5 @@
--TEST--
Request #50698_3 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large set of endpoints all incompatiable.)
Request #50698_3 (SoapClient should handle wsdls with some incompatible endpoints -- EDGECASE: Large set of endpoints all incompatible.)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--

View file

@ -1,5 +1,5 @@
--TEST--
Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoints)
Request #50698_4 (SoapClient should handle wsdls with some incompatible endpoints)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--INI--

View file

@ -7,7 +7,7 @@ Bug #70469 (SoapClient should not generate E_ERROR if exceptions enabled)
try {
$x = new SoapClient('http://i_dont_exist.com/some.wsdl');
} catch (SoapFault $e) {
echo "catched\n";
echo "caught\n";
}
$error = error_get_last();
@ -16,5 +16,5 @@ if ($error === null) {
}
?>
--EXPECT--
catched
caught
ok

View file

@ -1,5 +1,5 @@
--TEST--
SPL: ArrayObject with overriden count()
SPL: ArrayObject with overridden count()
--FILE--
<?php
$obj = new ArrayObject(array(1,2));

View file

@ -1,5 +1,5 @@
--TEST--
SPL: SplDoublyLinkedList with overriden count()
SPL: SplDoublyLinkedList with overridden count()
--FILE--
<?php
$obj = new SplDoublyLinkedList();

View file

@ -1,5 +1,5 @@
--TEST--
SPL: FixedArray: overriden count()
SPL: FixedArray: overridden count()
--FILE--
<?php
$obj = new SplFixedArray(2);

View file

@ -1,5 +1,5 @@
--TEST--
SPL: FixedArray: overriden iterator methods
SPL: FixedArray: overridden iterator methods
--FILE--
<?php
class SplFixedArray2 extends SplFixedArray {

View file

@ -1,5 +1,5 @@
--TEST--
SPL: SplHeap with overriden count()
SPL: SplHeap with overridden count()
--FILE--
<?php
$obj = new SplMaxHeap();

View file

@ -1,5 +1,5 @@
--TEST--
SPL: SplHeap with overriden compare()
SPL: SplHeap with overridden compare()
--FILE--
<?php
class SplMinHeap2 extends SplMinHeap {

View file

@ -1,5 +1,5 @@
--TEST--
SPL: RecursiveIteratorIterator - Ensure that non-overriden methods execute problem free.
SPL: RecursiveIteratorIterator - Ensure that non-overridden methods execute problem free.
--FILE--
<?php

View file

@ -1,5 +1,5 @@
--TEST--
Test array_chunk() function : basic functionality - defualt 'preserve_keys'
Test array_chunk() function : basic functionality - default 'preserve_keys'
--FILE--
<?php
/* Prototype : array array_chunk(array $array, int $size [, bool $preserve_keys])

View file

@ -23,7 +23,7 @@ $input_array = array (
"array3" => array(1)
);
echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --\n";
echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as default --\n";
var_dump( array_chunk($input_array, $size) );
echo "\n-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' = true --\n";
@ -37,7 +37,7 @@ echo "Done";
--EXPECT--
*** Testing array_chunk() : usage variations ***
-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as defualt --
-- Testing array_chunk() by supplying an array containing different sub arrays & 'preserve_key' as default --
array(2) {
[0]=>
array(2) {

View file

@ -69,7 +69,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);

View file

@ -51,7 +51,7 @@ $inputs = array (
'1' => 1,
'0' => 0),
//defualt keys => float values
//default keys => float values
/*7*/ array(2.00000000000001, 1.00, 0.01E-9),
//numeric keys => float values

View file

@ -90,7 +90,7 @@ $arrays = array(
/*24*/ $fp
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $unexpected_value) {
echo "\n-- Iteration $iterator --";

View file

@ -90,7 +90,7 @@ $arrays = array(
/*24*/ $fp
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $unexpected_value) {
echo "\n-- Iteration $iterator --";

View file

@ -71,7 +71,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);
@ -85,7 +85,7 @@ $arr2 = array (
'', null => "null", '' => 'emptys', "emptyd" => "",
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iteration $iterator --\n";

View file

@ -80,11 +80,11 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iteration $iterator --\n";

View file

@ -63,7 +63,7 @@ $arr2 = array(0 => 0, 2 => "float", 4 => "f3", 33333333 => "f4",
"\tHello" => 111, 2.2, 'color', "Hello world" => "string",
"pen\n" => 33, 133 => "int");
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iteration $iterator --\n";

View file

@ -63,7 +63,7 @@ $arr1 = array(0 => 0, 2 => "float", 4 => "f3", 33333333 => "f4",
"\tHello" => 111, 2.2, 'color', "Hello world" => "string",
"pen\n" => 33, 133 => "int");
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iteration $iterator --\n";

View file

@ -71,7 +71,7 @@ $arr2 = array(0 => "0", 1, "two" => 2, "float" => 2.3333, "f1" => 1.2,
"heredoc" => "Hello world", 11 => new classA(), "resource" => $fp,
"int" => 133, 222 => "fruit");
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iteration $iterator --\n";

View file

@ -71,7 +71,7 @@ $arr1 = array(0 => "0", 1, "two" => 2, "float" => 2.3333, "f1" => 1.2,
"heredoc" => "Hello world", 11 => new classA(), "resource" => $fp,
"int" => 133, 222 => "fruit");
// loop through each sub-array within $arrrays to check the behavior of array_intersect_assoc()
// loop through each sub-array within $arrays to check the behavior of array_intersect_assoc()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iteration $iterator --\n";

View file

@ -89,7 +89,7 @@ $arrays = array(
/*24*/ $fp
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $unexpected_value) {
echo "\n-- Iterator $iterator --";

View file

@ -89,7 +89,7 @@ $arrays = array(
/*24*/ $fp
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $unexpected_value) {
echo "\n-- Iterator $iterator --";

View file

@ -70,7 +70,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);
@ -84,7 +84,7 @@ $arr2 = array (
'', null => "null", '' => 'emptys'
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iterator $iterator --\n";

View file

@ -79,11 +79,11 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iteration $iterator --\n";

View file

@ -60,7 +60,7 @@ $arrays = array (
// array to be passsed to $arr2 argument
$arr2 = array(1, "float", "f4", "hello", 2.2, 'color', "string", "pen\n", 11);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iterator $iterator --\n";

View file

@ -60,7 +60,7 @@ $arrays = array (
// array to be passsed to $arr1 argument
$arr1 = array(1, "float", "f4", "hello", 2.2, 'color', "string", "pen\n", 11);
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iterator $iterator --\n";

View file

@ -68,7 +68,7 @@ $arrays = array (
$arr2 = array(1, 2, 1.2, 2.3333, "col\tor", '\v\fworld', $fp,
"Hello world", $heredoc, new classA(), 444.432, "fruit");
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr1) {
echo "-- Iterator $iterator --\n";

View file

@ -68,7 +68,7 @@ $arrays = array (
$arr1 = array(1, 2, 1.2, 2.3333, "col\tor", '\v\fworld', $fp,
"Hello world", $heredoc, new classA(), 444.432, "fruit");
// loop through each sub-array within $arrrays to check the behavior of array_intersect()
// loop through each sub-array within $arrays to check the behavior of array_intersect()
$iterator = 1;
foreach($arrays as $arr2) {
echo "-- Iterator $iterator --\n";

View file

@ -42,7 +42,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*18*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);

View file

@ -71,7 +71,7 @@ $inputs = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*19*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);

View file

@ -57,7 +57,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*18*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);

View file

@ -41,7 +41,7 @@ $arrays = array (
array(1 => '', 2 => "", 3 => NULL, 4 => null, 5 => false, 6 => true),
array('' => 1, "" => 2, NULL => 3, null => 4, false => 5, true => 6),
// array with repetative keys
// array with repetitive keys
/*18*/ array("One" => 1, "two" => 2, "One" => 10, "two" => 20, "three" => 3)
);

View file

@ -10,7 +10,7 @@ Test arsort() function : object functionality - sort objects
/*
* testing arsort() by providing integer/string object arrays with following flag values
* 1. Defualt flag value
* 1. Default flag value
* 2. SORT_REGULAR - compare items normally
*/
@ -59,14 +59,14 @@ $unsorted_str_obj = array (
);
echo "\n-- Testing arsort() by supplying various object arrays, 'flag' value is defualt --\n";
echo "\n-- Testing arsort() by supplying various object arrays, 'flag' value is default --\n";
// testing arsort() function by supplying integer object array, flag value is defualt
// testing arsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(arsort($temp_array) );
var_dump($temp_array);
// testing arsort() function by supplying string object array, flag value is defualt
// testing arsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(arsort($temp_array) );
var_dump($temp_array);

View file

@ -10,7 +10,7 @@ Test arsort() function : object functionality - sorting objects with diff. acces
/*
* testing arsort() by providing integer/string object arrays with following flag values
* 1. Defualt flag value
* 1. Default flag value
2. SORT_REGULAR - compare items normally
*/

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort octal values
/*
* testing arsort() by providing different octal array for $array argument with following flag values
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_oct_array = array (
077 => 077, -066 => -066, -0345 => -0345, 0 => 0
);
echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is defualt --\n";
echo "\n-- Testing arsort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( arsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying octal value array, 'flag' value is defualt --
-- Testing arsort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[669]=>

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort integer/float values
/*
* Testing arsort() by providing different integer/float value arrays for $array argument with following values
* 1. flag value as defualt
* 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
*/

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort reference variables
/*
* Testing arsort() by providing reference variable array with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
@ -24,7 +24,7 @@ $value3 = 555;
// an array containing integer references
$unsorted_numerics = array( 1 => &$value1 , 2 => &$value2, 3 => &$value3);
echo "\n-- Testing arsort() by supplying reference variable array, 'flag' value is defualt --\n";
echo "\n-- Testing arsort() by supplying reference variable array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( arsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
@ -44,7 +44,7 @@ echo "Done\n";
--EXPECT--
*** Testing arsort() :usage variations ***
-- Testing arsort() by supplying reference variable array, 'flag' value is defualt --
-- Testing arsort() by supplying reference variable array, 'flag' value is default --
bool(true)
array(3) {
[3]=>

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort strings
/*
* testing arsort() by providing different string arrays for $array argument with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_STRING - compare items as strings
*/

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort hexadecimal values
/*
* testing arsort() by providing different hexa-decimal array for $array argument with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_hex_array = array ( 0x1AB => 0x1AB, 0xFFF => 0xFFF, 0xF => 0xF, 0xFF =
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
echo "\n-- Testing arsort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(arsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying hexadecimal value array, 'flag' value is defualt --
-- Testing arsort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[4095]=>

View file

@ -10,7 +10,7 @@ Test arsort() function : usage variations - sort bool values
/*
* testing arsort() by providing bool value array for $array argument with following flag values.
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
*/
@ -19,7 +19,7 @@ echo "*** Testing arsort() : usage variations ***\n";
// bool value array
$bool_values = array (1 => true, 2 => false, 3 => TRUE, 4 => FALSE);
echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is defualt --\n";
echo "\n-- Testing arsort() by supplying bool value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(arsort($temp_array) );
var_dump($temp_array);
@ -44,7 +44,7 @@ echo "Done\n";
--EXPECT--
*** Testing arsort() : usage variations ***
-- Testing arsort() by supplying bool value array, 'flag' value is defualt --
-- Testing arsort() by supplying bool value array, 'flag' value is default --
bool(true)
array(4) {
[1]=>

View file

@ -10,7 +10,7 @@ Test asort() function : object functionality - sort objects
/*
* testing asort() by providing integer/string object arrays with following flag values
* 1. Defualt flag value
* 1. Default flag value
* 2. SORT_REGULAR - compare items normally
*/
@ -59,14 +59,14 @@ $unsorted_str_obj = array (
);
echo "\n-- Testing asort() by supplying various object arrays, 'flag' value is defualt --\n";
echo "\n-- Testing asort() by supplying various object arrays, 'flag' value is default --\n";
// testing asort() function by supplying integer object array, flag value is defualt
// testing asort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(asort($temp_array) );
var_dump($temp_array);
// testing asort() function by supplying string object array, flag value is defualt
// testing asort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(asort($temp_array) );
var_dump($temp_array);
@ -87,7 +87,7 @@ echo "Done\n";
--EXPECTF--
*** Testing asort() : object functionality ***
-- Testing asort() by supplying various object arrays, 'flag' value is defualt --
-- Testing asort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[4]=>

View file

@ -10,7 +10,7 @@ Test asort() function : object functionality - sorting objects with diff. access
/*
* testing asort() by providing integer/string object arrays with following flag values
* 1. Defualt flag value
* 1. Default flag value
2. SORT_REGULAR - compare items normally
*/

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort octal values
/*
* testing asort() by providing different octal array for $array argument with following flag values
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_oct_array = array (
077 => 077, -066 => -066, -0345 => -0345, 0 => 0
);
echo "\n-- Testing asort() by supplying octal value array, 'flag' value is defualt --\n";
echo "\n-- Testing asort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( asort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying octal value array, 'flag' value is defualt --
-- Testing asort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[-229]=>

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort integer/float values
/*
* Testing asort() by providing different integer/float value arrays for $array argument with following values
* 1. flag value as defualt
* 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
*/

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort reference variables
/*
* Testing asort() by providing reference variable array with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
@ -24,7 +24,7 @@ $value3 = 555;
// an array containing integer references
$unsorted_numerics = array( 1 => &$value1 , 2 => &$value2, 3 => &$value3);
echo "\n-- Testing asort() by supplying reference variable array, 'flag' value is defualt --\n";
echo "\n-- Testing asort() by supplying reference variable array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( asort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
@ -44,7 +44,7 @@ echo "Done\n";
--EXPECT--
*** Testing asort() :usage variations ***
-- Testing asort() by supplying reference variable array, 'flag' value is defualt --
-- Testing asort() by supplying reference variable array, 'flag' value is default --
bool(true)
array(3) {
[2]=>

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort strings
/*
* testing asort() by providing different string arrays for $array argument with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_STRING - compare items as strings
*/

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort hexadecimal values
/*
* testing asort() by providing different hexa-decimal array for $array argument with following flag values
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
* SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_hex_array = array ( 0x1AB => 0x1AB, 0xFFF => 0xFFF, 0xF => 0xF, 0xFF =
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
echo "\n-- Testing asort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
echo "\n-- Testing asort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(asort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying hexadecimal value array, 'flag' value is defualt --
-- Testing asort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[-682]=>

View file

@ -10,7 +10,7 @@ Test asort() function : usage variations - sort bool values
/*
* testing asort() by providing bool value array for $array argument with following flag values.
* flag value as defualt
* flag value as default
* SORT_REGULAR - compare items normally
*/
@ -19,7 +19,7 @@ echo "*** Testing asort() : usage variations ***\n";
// bool value array
$bool_values = array (1 => true, 2 => false, 3 => TRUE, 4 => FALSE);
echo "\n-- Testing asort() by supplying bool value array, 'flag' value is defualt --\n";
echo "\n-- Testing asort() by supplying bool value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(asort($temp_array) );
var_dump($temp_array);
@ -44,7 +44,7 @@ echo "Done\n";
--EXPECT--
*** Testing asort() : usage variations ***
-- Testing asort() by supplying bool value array, 'flag' value is defualt --
-- Testing asort() by supplying bool value array, 'flag' value is default --
bool(true)
array(4) {
[2]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : basic functionality
/*
* Testing krsort() by providing array of integer/string values to check the basic functionality
* with following flag values :
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
* 4.SORT_STRING - compare items as strings
@ -28,12 +28,12 @@ $unsorted_strings = array(
// an array containing unsorted numeric values with indices
$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
echo "\n-- Testing krsort() by supplying string array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "\n-- Testing krsort() by supplying numeric array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
@ -78,7 +78,7 @@ echo "Done\n";
--EXPECT--
*** Testing krsort() : basic functionality ***
-- Testing krsort() by supplying string array, 'flag' value is defualt --
-- Testing krsort() by supplying string array, 'flag' value is default --
bool(true)
array(8) {
["o20"]=>
@ -99,7 +99,7 @@ array(8) {
string(6) "Orange"
}
-- Testing krsort() by supplying numeric array, 'flag' value is defualt --
-- Testing krsort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[555]=>

View file

@ -8,7 +8,7 @@ Test krsort() function : object functionality - sort objects
*/
/*
* testing krsort() by providing array of integer/string objects with following flag values:
* 1.Defualt flag value
* 1.Default flag value
* 2.SORT_REGULAR - compare items normally
*/
@ -56,14 +56,14 @@ $unsorted_str_obj = array (
);
echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying various object arrays, 'flag' value is default --\n";
// testing krsort() function by supplying integer object array, flag value is defualt
// testing krsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(krsort($temp_array) );
var_dump($temp_array);
// testing krsort() function by supplying string object array, flag value is defualt
// testing krsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(krsort($temp_array) );
var_dump($temp_array);
@ -84,7 +84,7 @@ echo "Done\n";
--EXPECTF--
*** Testing krsort() : object functionality ***
-- Testing krsort() by supplying various object arrays, 'flag' value is defualt --
-- Testing krsort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[50]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort heredoc strings
/*
* testing krsort() by providing array of heredoc strings for $array argument with
* following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
@ -37,7 +37,7 @@ $array = array (
$multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
);
echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying heredoc string array, 'flag' value is default --\n";
$temp_array = $array;
var_dump(krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -57,7 +57,7 @@ echo "Done\n";
--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying heredoc string array, 'flag' value is defualt --
-- Testing krsort() by supplying heredoc string array, 'flag' value is default --
bool(true)
array(3) {
["heredoc string with!@# and 123

View file

@ -9,7 +9,7 @@ Test krsort() function : usage variations - sort bool values
/*
* testing krsort() by providing array of boolean values for $array argument with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
@ -18,7 +18,7 @@ echo "*** Testing krsort() : usage variations ***\n";
// bool value array
$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying boolean value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(krsort($temp_array) );
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying boolean value array, 'flag' value is defualt --
-- Testing krsort() by supplying boolean value array, 'flag' value is default --
bool(true)
array(2) {
[1]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort integer/float values
/*
* Testing krsort() by providing array of integer/float/mixed values for $array argument
* with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -40,7 +40,7 @@ echo "\n-- Testing krsort() by supplying various integer/float arrays --\n";
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(krsort($temp_array) );
var_dump($temp_array);
@ -63,7 +63,7 @@ echo "Done\n";
-- Testing krsort() by supplying various integer/float arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(9) {
[8]=>
@ -131,7 +131,7 @@ array(9) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[6]=>
@ -181,7 +181,7 @@ array(6) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
[11]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort octal values
/*
* testing krsort() by providing array of octal values for $array argument
* with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_oct_array = array (
077 => 06, -066 => -01, -0345 => -02, 0 => 0
);
echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying octal value array, 'flag' value is defualt --
-- Testing krsort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[669]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort strings
/*
* testing krsort() by providing array of string values for $array argument with
* following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
@ -40,7 +40,7 @@ echo "\n-- Testing krsort() by supplying various string arrays --\n";
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(krsort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -63,7 +63,7 @@ echo "Done\n";
-- Testing krsort() by supplying various string arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
["\xhh"]=>
@ -149,7 +149,7 @@ array(11) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
["x"]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort hexadecimal values
/*
* testing krsort() by providing array of hexa-decimal values for $array argument
* with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_hex_array = array (
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
echo "\n-- Testing krsort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(krsort( $temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing krsort() : usage variations ***
-- Testing krsort() by supplying hexadecimal value array, 'flag' value is defualt --
-- Testing krsort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[4095]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort array with diff. sub arrays
/*
* testing krsort() by providing arrays contains sub arrays for $array argument
* with flowing flag values
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
@ -40,7 +40,7 @@ echo "\n-- Testing krsort() by supplying various arrays containing sub arrays --
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( krsort($temp_array) );
var_dump($temp_array);
@ -60,7 +60,7 @@ echo "Done\n";
-- Testing krsort() by supplying various arrays containing sub arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(0) {
}
@ -70,7 +70,7 @@ array(0) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(1) {
[1]=>
@ -86,7 +86,7 @@ array(1) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
[4]=>
@ -118,7 +118,7 @@ array(3) {
}
-- Iteration 4 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(4) {
[3]=>

View file

@ -10,7 +10,7 @@ Test krsort() function : usage variations - sort array with/without key values
/*
* Testing krsort() by providing arrays with/without key values for $array argument
* with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
@ -34,7 +34,7 @@ echo "\n-- Testing krsort() by supplying various arrays with/without key values
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( krsort($temp_array) );
var_dump($temp_array);
@ -54,7 +54,7 @@ echo "Done\n";
-- Testing krsort() by supplying various arrays with/without key values --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(5) {
[9]=>
@ -84,7 +84,7 @@ array(5) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
["a"]=>
@ -106,7 +106,7 @@ array(3) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[5]=>
@ -140,7 +140,7 @@ array(6) {
}
-- Iteration 4 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
[5]=>
@ -162,7 +162,7 @@ array(3) {
}
-- Iteration 5 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[9]=>
@ -196,7 +196,7 @@ array(6) {
}
-- Iteration 6 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(2) {
["foo"]=>
@ -214,7 +214,7 @@ array(2) {
}
-- Iteration 7 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(4) {
["d"]=>

View file

@ -9,7 +9,7 @@ Test ksort() function : basic functionality
/*
* Testing ksort() by providing array of integer/string values to check the basic functionality with following flag values :
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
* 4.SORT_STRING - compare items as strings
@ -26,12 +26,12 @@ $unsorted_strings = array(
// an array containing unsorted numeric values with indices
$unsorted_numerics = array( 100 => 4, 33 => 3, 555 => 2, 22 => 1 );
echo "\n-- Testing ksort() by supplying string array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
echo "\n-- Testing ksort() by supplying numeric array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump( $temp_array);
@ -76,7 +76,7 @@ echo "Done\n";
--EXPECT--
*** Testing ksort() : basic functionality ***
-- Testing ksort() by supplying string array, 'flag' value is defualt --
-- Testing ksort() by supplying string array, 'flag' value is default --
bool(true)
array(8) {
["O"]=>
@ -97,7 +97,7 @@ array(8) {
string(8) "orange20"
}
-- Testing ksort() by supplying numeric array, 'flag' value is defualt --
-- Testing ksort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[22]=>

View file

@ -55,14 +55,14 @@ $unsorted_str_obj = array (
"apple" => new StringObject("apple"), "Orange" => new StringObject("Orange"),
"Lemon" => new StringObject("Lemon"), "aPPle" => new StringObject("aPPle")
);
echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying various object arrays, 'flag' value is default --\n";
// testing ksort() function by supplying integer object array, flag value is defualt
// testing ksort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(ksort($temp_array) );
var_dump($temp_array);
// testing ksort() function by supplying string object array, flag value is defualt
// testing ksort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(ksort($temp_array) );
var_dump($temp_array);
@ -83,7 +83,7 @@ echo "Done\n";
--EXPECTF--
*** Testing ksort() : object functionality ***
-- Testing ksort() by supplying various object arrays, 'flag' value is defualt --
-- Testing ksort() by supplying various object arrays, 'flag' value is default --
bool(true)
array(6) {
[-5]=>

View file

@ -9,7 +9,7 @@ Test ksort() function : usage variations - sort octal values
/*
* testing ksort() by providing array of octal values for $array argument with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -22,7 +22,7 @@ $unsorted_oct_array = array (
077 => 06, -066 => -01, -0345 => -02, 0 => 0
);
echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying octal value array, 'flag' value is default --\n";
$temp_array = $unsorted_oct_array;
var_dump( ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -42,7 +42,7 @@ echo "Done\n";
--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying octal value array, 'flag' value is defualt --
-- Testing ksort() by supplying octal value array, 'flag' value is default --
bool(true)
array(9) {
[-229]=>

View file

@ -10,7 +10,7 @@ Test ksort() function : usage variations - sort heredoc strings
/*
* testing ksort() by providing array of heredoc strings for $array argument with
* following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
@ -37,7 +37,7 @@ $array = array (
$multiline_heredoc => "heredoc string\twith!@# and 123\nTest this!!!"
);
echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying heredoc string array, 'flag' value is default --\n";
$temp_array = $array;
var_dump(ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -57,7 +57,7 @@ echo "Done\n";
--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying heredoc string array, 'flag' value is defualt --
-- Testing ksort() by supplying heredoc string array, 'flag' value is default --
bool(true)
array(3) {
["HEREDOC"]=>

View file

@ -10,7 +10,7 @@ Test ksort() function : usage variations - sort integer/float values
/*
* Testing ksort() by providing array of integer/float/mixed values for $array argument
* with following flag values:
* 1. flag value as defualt
* 1. flag value as default
* 2. SORT_REGULAR - compare items normally
* 3. SORT_NUMERIC - compare items numerically
*/
@ -40,7 +40,7 @@ echo "\n-- Testing ksort() by supplying various integer/float arrays --\n";
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(ksort($temp_array) );
var_dump($temp_array);
@ -63,7 +63,7 @@ echo "Done\n";
-- Testing ksort() by supplying various integer/float arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(9) {
[-10]=>
@ -131,7 +131,7 @@ array(9) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[-7]=>
@ -181,7 +181,7 @@ array(6) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
[-10]=>

View file

@ -9,7 +9,7 @@ Test ksort() function : usage variations - sort bool values
/*
* testing ksort() by providing array of boolean values for $array argument with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
@ -18,7 +18,7 @@ echo "*** Testing ksort() : usage variations ***\n";
// bool value array
$bool_values = array (true => true, false => false, TRUE => TRUE, FALSE => FALSE);
echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying boolean value array, 'flag' value is default --\n";
$temp_array = $bool_values;
var_dump(ksort($temp_array) );
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying boolean value array, 'flag' value is defualt --
-- Testing ksort() by supplying boolean value array, 'flag' value is default --
bool(true)
array(2) {
[0]=>

View file

@ -10,7 +10,7 @@ Test ksort() function : usage variations - sort strings
/*
* testing ksort() by providing array of string values for $array argument with
* following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_STRING - compare items as strings
*/
@ -40,7 +40,7 @@ echo "\n-- Testing ksort() by supplying various string arrays --\n";
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump(ksort($temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -63,7 +63,7 @@ echo "Done\n";
-- Testing ksort() by supplying various string arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
[""]=>
@ -149,7 +149,7 @@ array(11) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(11) {
["Apple"]=>

View file

@ -9,7 +9,7 @@ Test ksort() function : usage variations - sort hexadecimal values
/*
* testing ksort() by providing array of hexa-decimal values for $array argument with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
* 3.SORT_NUMERIC - compare items numerically
*/
@ -23,7 +23,7 @@ $unsorted_hex_array = array (
0x1ab => 0x1ab, 0xff => 0xff, -0xff => -0xFF, 0 => 0, -0x2aa => -0x2aa
);
echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --\n";
echo "\n-- Testing ksort() by supplying hexadecimal value array, 'flag' value is default --\n";
$temp_array = $unsorted_hex_array;
var_dump(ksort( $temp_array) ); // expecting : bool(true)
var_dump($temp_array);
@ -43,7 +43,7 @@ echo "Done\n";
--EXPECT--
*** Testing ksort() : usage variations ***
-- Testing ksort() by supplying hexadecimal value array, 'flag' value is defualt --
-- Testing ksort() by supplying hexadecimal value array, 'flag' value is default --
bool(true)
array(9) {
[-682]=>

View file

@ -10,7 +10,7 @@ Test ksort() function : usage variations - sort array with diff. sub arrays
/*
* testing ksort() by providing arrays containing sub arrays for $array argument
* with flowing flag values:
* 1. flag value as defualt
* 1. flag value as default
* 2. SORT_REGULAR - compare items normally
*/
@ -40,7 +40,7 @@ echo "\n-- Testing ksort() by supplying various arrays containing sub arrays --\
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( ksort($temp_array) );
var_dump($temp_array);
@ -60,7 +60,7 @@ echo "Done\n";
-- Testing ksort() by supplying various arrays containing sub arrays --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(0) {
}
@ -70,7 +70,7 @@ array(0) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(1) {
[1]=>
@ -86,7 +86,7 @@ array(1) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
[1]=>
@ -118,7 +118,7 @@ array(3) {
}
-- Iteration 4 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(4) {
[0]=>

View file

@ -9,7 +9,7 @@ Test ksort() function : usage variations - sorting arrays with/without keys
/*
* Testing ksort() by providing arrays with/without key values for $array argument with following flag values:
* 1.flag value as defualt
* 1.flag value as default
* 2.SORT_REGULAR - compare items normally
*/
@ -33,7 +33,7 @@ echo "\n-- Testing ksort() by supplying various arrays with/without key values -
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With defualt sort flag -\n";
echo "- With default sort flag -\n";
$temp_array = $array;
var_dump( ksort($temp_array) );
var_dump($temp_array);
@ -53,7 +53,7 @@ echo "Done\n";
-- Testing ksort() by supplying various arrays with/without key values --
-- Iteration 1 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(5) {
[5]=>
@ -83,7 +83,7 @@ array(5) {
}
-- Iteration 2 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
["a"]=>
@ -105,7 +105,7 @@ array(3) {
}
-- Iteration 3 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[0]=>
@ -139,7 +139,7 @@ array(6) {
}
-- Iteration 4 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(3) {
[0]=>
@ -161,7 +161,7 @@ array(3) {
}
-- Iteration 5 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(6) {
[0]=>
@ -195,7 +195,7 @@ array(6) {
}
-- Iteration 6 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(2) {
["bar"]=>
@ -213,7 +213,7 @@ array(2) {
}
-- Iteration 7 --
- With defualt sort flag -
- With default sort flag -
bool(true)
array(4) {
["a"]=>

View file

@ -23,12 +23,12 @@ $unsorted_strings = array(
// array with default keys containing unsorted numeric values
$unsorted_numerics = array( 100, 33, 555, 22 );
echo "\n-- Testing rsort() by supplying string array, 'flag' value is defualt --\n";
echo "\n-- Testing rsort() by supplying string array, 'flag' value is default --\n";
$temp_array = $unsorted_strings;
var_dump( rsort($temp_array) );
var_dump( $temp_array);
echo "\n-- Testing rsort() by supplying numeric array, 'flag' value is defualt --\n";
echo "\n-- Testing rsort() by supplying numeric array, 'flag' value is default --\n";
$temp_array = $unsorted_numerics;
var_dump( rsort($temp_array) );
var_dump( $temp_array);
@ -73,7 +73,7 @@ echo "Done";
--EXPECT--
*** Testing rsort() : basic functionality ***
-- Testing rsort() by supplying string array, 'flag' value is defualt --
-- Testing rsort() by supplying string array, 'flag' value is default --
bool(true)
array(8) {
[0]=>
@ -94,7 +94,7 @@ array(8) {
string(6) "Orange"
}
-- Testing rsort() by supplying numeric array, 'flag' value is defualt --
-- Testing rsort() by supplying numeric array, 'flag' value is default --
bool(true)
array(4) {
[0]=>

View file

@ -58,12 +58,12 @@ $unsorted_str_obj = array (
echo "\n-- Sort flag = default --\n";
// testing rsort() function by supplying integer object array, flag value is defualt
// testing rsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
// testing rsort() function by supplying string object array, flag value is defualt
// testing rsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);

View file

@ -69,12 +69,12 @@ $unsorted_str_obj = array (
echo "\n-- Sort flag = default --\n";
// testing rsort() function by supplying integer object array, flag value is defualt
// testing rsort() function by supplying integer object array, flag value is default
$temp_array = $unsorted_int_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);
// testing rsort() function by supplying string object array, flag value is defualt
// testing rsort() function by supplying string object array, flag value is default
$temp_array = $unsorted_str_obj;
var_dump(rsort($temp_array) );
var_dump($temp_array);

View file

@ -42,7 +42,7 @@ $count = 1;
foreach ($various_arrays as $array) {
echo "\n-- Iteration $count --\n";
echo "- With Defualt sort flag -\n";
echo "- With Default sort flag -\n";
$temp_array = $array;
var_dump(rsort($temp_array) );
var_dump($temp_array);
@ -63,7 +63,7 @@ echo "Done";
*** Testing rsort() : variation ***
-- Iteration 1 --
- With Defualt sort flag -
- With Default sort flag -
bool(true)
array(9) {
[0]=>
@ -131,7 +131,7 @@ array(9) {
}
-- Iteration 2 --
- With Defualt sort flag -
- With Default sort flag -
bool(true)
array(7) {
[0]=>
@ -187,7 +187,7 @@ array(7) {
}
-- Iteration 3 --
- With Defualt sort flag -
- With Default sort flag -
bool(true)
array(11) {
[0]=>
@ -267,7 +267,7 @@ array(11) {
}
-- Iteration 4 --
- With Defualt sort flag -
- With Default sort flag -
bool(true)
array(7) {
[0]=>

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