"Strange MySQL example"
}
-Thats it!
+That's it!
Take a look at the STDIO implementation in streams.c for more information
about how these operations work.
var_dump( empty($array_var) ); // expected: bool(true)
}
-echo "\n*** Testing unset(), emtpy() & isset() with resource variables ***\n";
+echo "\n*** Testing unset(), empty() & isset() with resource variables ***\n";
$fp = fopen(__FILE__, "r");
$dfp = opendir( dirname(__FILE__) );
$resources = array (
bool(false)
bool(true)
-*** Testing unset(), emtpy() & isset() with resource variables ***
+*** Testing unset(), empty() & isset() with resource variables ***
-- Iteration 1 --
resource(%d) of type (stream)
bool(true)
--TEST--
-If the LHS of ref-assign ERRORs, that takes precendence over the "only variables" notice
+If the LHS of ref-assign ERRORs, that takes precedence over the "only variables" notice
--FILE--
<?php
--TEST--
-assgin to object leaks with ref
+assign to object leaks with ref
--FILE--
<?php
function &a($i) {
--TEST--
-Bug #26698 (Thrown exceptions while evaluting argument to pass as parameter crash PHP)
+Bug #26698 (Thrown exceptions while evaluating argument to pass as parameter crash PHP)
--FILE--
<?php
}
public function valid() {
- throw new Exception('shit happend');
+ throw new Exception('shit happened');
return ($this->current() !== false);
}
}
echo "?\n";
} catch(Exception $e) {
- echo "This Exception should be catched\n";
+ echo "This Exception should be caught\n";
}
function errorHandler($errno, $errstr, $errfile, $errline, $vars) {
throw new Exception('Some Exception');
}
?>
--EXPECT--
-This Exception should be catched
+This Exception should be caught
try {
TestClass::testMethod();
} catch (Exception $e) {
- echo "Catched: ".$e->getMessage()."\n";
+ echo "Caught: ".$e->getMessage()."\n";
}
?>
--EXPECT--
-Catched: Error occuried: Non-static method TestClass::testMethod() should not be called statically
+Caught: Error occuried: Non-static method TestClass::testMethod() should not be called statically
--TEST--
-Bug #44660 (Indexed and reference assignment to propery of non-object don't trigger warning)
+Bug #44660 (Indexed and reference assignment to property of non-object don't trigger warning)
--FILE--
<?php
$s = "hello";
--TEST--
-Bug #51791 (constant() failed to check undefined constant and php interpreter stoped)
+Bug #51791 (constant() failed to check undefined constant and php interpreter stopped)
--FILE--
<?php
public function __toString() {
global $handler;
$handler = $this;
- $this->_this = $this; // <-- uncoment this
+ $this->_this = $this; // <-- uncomment this
return 'A';
}
}
<?php
class Node {
public $parent = NULL;
- public $childs = array();
+ public $children = array();
function __construct(Node $parent=NULL) {
if ($parent) {
- $parent->childs[] = $this;
+ $parent->children[] = $this;
}
- $this->childs[] = $this;
+ $this->children[] = $this;
}
function __destruct() {
- $this->childs = NULL;
+ $this->children = NULL;
}
}
return true;
} finally {
try {
- throw new Exception("catched");
+ throw new Exception("caught");
} catch (Exception $e) {
}
}
function foo2() {
try {
try {
- throw new Exception("catched");
+ throw new Exception("caught");
return true;
} finally {
try {
- throw new Exception("catched");
+ throw new Exception("caught");
} catch (Exception $e) {
}
}
function foo3() {
try {
- throw new Exception("not catched");
+ throw new Exception("not caught");
return true;
} finally {
try {
string(9) "not catch"
NULL
-Fatal error: Uncaught Exception: not catched in %sbug65784.php:42
+Fatal error: Uncaught Exception: not caught in %sbug65784.php:42
Stack trace:
#0 %sbug65784.php(52): foo3()
#1 {main}
--TEST--
-Bug #69892: Different arrays compare indentical due to integer key truncation
+Bug #69892: Different arrays compare identical due to integer key truncation
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); ?>
--FILE--
echo " Inner finally\n";
}
}
- echo "Outer shouldnt get here\n";
+ echo "Outer shouldn't get here\n";
} catch (Exception $e) {
echo "Outer catch\n";
} finally {
--TEST--
-Bug #75420 (Crash when modifing property name in __isset for BP_VAR_IS)
+Bug #75420 (Crash when modifying property name in __isset for BP_VAR_IS)
--FILE--
<?php
--TEST--
-010: Accesing internal namespace class
+010: Accessing internal namespace class
--FILE--
<?php
namespace X;
--TEST--
-020: Accesing internal namespace function
+020: Accessing internal namespace function
--FILE--
<?php
namespace X;
--TEST--
-Magic methods in overrided stdClass inside namespace
+Magic methods in overridden stdClass inside namespace
--FILE--
<?php
#endif
/*
- * Memory is retrived from OS by chunks of fixed size 2MB.
+ * Memory is retrieved from OS by chunks of fixed size 2MB.
* Inside chunk it's managed by pages of fixed size 4096B.
* So each chunk consists from 512 pages.
* The first page of each chunk is reseved for chunk header.
zend_mm_chunk *main_chunk;
zend_mm_chunk *cached_chunks; /* list of unused chunks */
- int chunks_count; /* number of alocated chunks */
+ int chunks_count; /* number of allocated chunks */
int peak_chunks_count; /* peak number of allocated chunks for current request */
int cached_chunks_count; /* number of cached chunks */
double avg_chunks_count; /* average number of chunks allocated per request */
}
/*
- * Operator Precendence
+ * Operator Precedence
* ====================
* priority associativity operators
* ----------------------------------
def->opcode == ZEND_JMPNZ_EX ||
def->opcode == ZEND_BOOL ||
def->opcode == ZEND_BOOL_NOT) {
- /* result IS_BOOL, it does't have to be destroyed */
+ /* result IS_BOOL, it doesn't have to be destroyed */
break;
} else if (def->opcode == ZEND_DECLARE_CLASS ||
def->opcode == ZEND_DECLARE_INHERITED_CLASS ||
/* | | | */
#define ZEND_ACC_GENERATOR (1 << 23) /* | X | | */
/* | | | */
-/* Function with varable number of arguments | | | */
+/* Function with variable number of arguments | | | */
#define ZEND_ACC_VARIADIC (1 << 24) /* | X | | */
/* | | | */
/* Immutable op_array (lazy loading) | | | */
* such exceptions in that handler.
* Also all getXY() methods are final because thy serve as read only access to
* their corresponding properties, no more, no less. If after all you need to
- * override somthing then it is method __toString().
+ * override something then it is method __toString().
* And never try to change the state of exceptions and never implement anything
* that gives the user anything to accomplish this.
*/
#include "zend_smart_str.h"
#include "zend_operators.h"
-static void overriden_ptr_dtor(zval *zv) /* {{{ */
+static void overridden_ptr_dtor(zval *zv) /* {{{ */
{
efree_size(Z_PTR_P(zv), sizeof(zend_function));
}
}
/* }}} */
-static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_string *key, zend_function *fn, HashTable **overriden) /* {{{ */
+static void zend_add_trait_method(zend_class_entry *ce, const char *name, zend_string *key, zend_function *fn, HashTable **overridden) /* {{{ */
{
zend_function *existing_fn = NULL;
zend_function *new_fn;
if (existing_fn->common.scope == ce) {
/* members from the current class override trait methods */
- /* use temporary *overriden HashTable to detect hidden conflict */
- if (*overriden) {
- if ((existing_fn = zend_hash_find_ptr(*overriden, key)) != NULL) {
+ /* use temporary *overridden HashTable to detect hidden conflict */
+ if (*overridden) {
+ if ((existing_fn = zend_hash_find_ptr(*overridden, key)) != NULL) {
if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT) {
/* Make sure the trait method is compatible with previosly declared abstract method */
if (UNEXPECTED(!zend_traits_method_compatibility_check(fn, existing_fn))) {
}
}
} else {
- ALLOC_HASHTABLE(*overriden);
- zend_hash_init_ex(*overriden, 8, NULL, overriden_ptr_dtor, 0, 0);
+ ALLOC_HASHTABLE(*overridden);
+ zend_hash_init_ex(*overridden, 8, NULL, overridden_ptr_dtor, 0, 0);
}
- zend_hash_update_mem(*overriden, key, fn, sizeof(zend_function));
+ zend_hash_update_mem(*overridden, key, fn, sizeof(zend_function));
return;
} else if (existing_fn->common.fn_flags & ZEND_ACC_ABSTRACT &&
(existing_fn->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) {
}
/* }}} */
-static int zend_traits_copy_functions(zend_string *fnname, zend_function *fn, zend_class_entry *ce, HashTable **overriden, HashTable *exclude_table, zend_class_entry **aliases) /* {{{ */
+static int zend_traits_copy_functions(zend_string *fnname, zend_function *fn, zend_class_entry *ce, HashTable **overridden, HashTable *exclude_table, zend_class_entry **aliases) /* {{{ */
{
zend_trait_alias *alias, **alias_ptr;
zend_string *lcname;
}
lcname = zend_string_tolower(alias->alias);
- zend_add_trait_method(ce, ZSTR_VAL(alias->alias), lcname, &fn_copy, overriden);
+ zend_add_trait_method(ce, ZSTR_VAL(alias->alias), lcname, &fn_copy, overridden);
zend_string_release_ex(lcname, 0);
/* Record the trait from which this alias was resolved. */
}
}
- zend_add_trait_method(ce, ZSTR_VAL(fn->common.function_name), fnname, &fn_copy, overriden);
+ zend_add_trait_method(ce, ZSTR_VAL(fn->common.function_name), fnname, &fn_copy, overridden);
}
return ZEND_HASH_APPLY_KEEP;
static void zend_do_traits_method_binding(zend_class_entry *ce, HashTable **exclude_tables, zend_class_entry **aliases) /* {{{ */
{
uint32_t i;
- HashTable *overriden = NULL;
+ HashTable *overridden = NULL;
zend_string *key;
zend_function *fn;
for (i = 0; i < ce->num_traits; i++) {
/* copies functions, applies defined aliasing, and excludes unused trait methods */
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->traits[i]->function_table, key, fn) {
- zend_traits_copy_functions(key, fn, ce, &overriden, exclude_tables[i], aliases);
+ zend_traits_copy_functions(key, fn, ce, &overridden, exclude_tables[i], aliases);
} ZEND_HASH_FOREACH_END();
if (exclude_tables[i]) {
} else {
for (i = 0; i < ce->num_traits; i++) {
ZEND_HASH_FOREACH_STR_KEY_PTR(&ce->traits[i]->function_table, key, fn) {
- zend_traits_copy_functions(key, fn, ce, &overriden, NULL, aliases);
+ zend_traits_copy_functions(key, fn, ce, &overridden, NULL, aliases);
} ZEND_HASH_FOREACH_END();
}
}
zend_fixup_trait_method(fn, ce);
} ZEND_HASH_FOREACH_END();
- if (overriden) {
- zend_hash_destroy(overriden);
- FREE_HASHTABLE(overriden);
+ if (overridden) {
+ zend_hash_destroy(overridden);
+ FREE_HASHTABLE(overridden);
}
}
/* }}} */
/* inheritance ensures the class has necessary userland methods */
return SUCCESS;
} else if (class_type->get_iterator != zend_user_it_get_new_iterator) {
- /* c-level get_iterator cannot be changed (exception being only Traversable is implmented) */
+ /* c-level get_iterator cannot be changed (exception being only Traversable is implemented) */
if (class_type->num_interfaces) {
for (i = 0; i < class_type->num_interfaces; i++) {
if (class_type->interfaces[i] == zend_ce_iterator) {
}
}
- /* check if static properties were destoyed */
+ /* check if static properties were destroyed */
if (UNEXPECTED(CE_STATIC_MEMBERS(ce) == NULL)) {
if (ce->type == ZEND_INTERNAL_CLASS) {
zend_intenal_class_init_statics(ce);
/* }}} */
/* {{{ proto string bcsqrt(string operand [, int scale])
- Returns the square root of an arbitray precision number */
+ Returns the square root of an arbitrary precision number */
PHP_FUNCTION(bcsqrt)
{
zend_string *left;
* Wdy, DD Mon YY HH:MM:SS TIMEZONE
* There is no hope of having a complete list of timezones. Universal
* Time (GMT), the North American timezones (PST, PDT, MST, MDT, CST,
- * CDT, EST, EDT) and the +/-hhmm offset specifed in RFC-822 should be supported.
+ * CDT, EST, EDT) and the +/-hhmm offset specified in RFC-822 should be supported.
*/
#define DATE_FORMAT_RFC1036 "D, d M y H:i:s O"
/* }}} */
/* {{{ proto string timezone_name_from_abbr(string abbr[, int gmtOffset[, int isdst]])
- Returns the timezone name from abbrevation
+ Returns the timezone name from abbreviation
*/
PHP_FUNCTION(timezone_name_from_abbr)
{
ImageInfo->CopyrightPhotographer = estrdup(value_ptr);
ImageInfo->CopyrightEditor = estrndup(value_ptr+length+1, byte_count-length-1);
spprintf(&ImageInfo->Copyright, 0, "%s, %s", ImageInfo->CopyrightPhotographer, ImageInfo->CopyrightEditor);
- /* format = TAG_FMT_UNDEFINED; this musn't be ASCII */
+ /* format = TAG_FMT_UNDEFINED; this mustn't be ASCII */
/* but we are not supposed to change this */
/* keep in mind that image_info does not store editor value */
} else {
/* }}} */
/* {{{ proto string finfo_buffer(resource finfo, char *string [, int options [, resource context]])
- Return infromation about a string buffer. */
+ Return information about a string buffer. */
PHP_FUNCTION(finfo_buffer)
{
_php_finfo_get_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, FILEINFO_MODE_BUFFER, 0);
}
/**
- * Get the mailbox name from a mailbox decription, i.e strip off server details.
+ * Get the mailbox name from a mailbox description, i.e strip off server details.
*
* @param string mailbox complete mailbox name
* @return mailbox name
$username = 'webmaster@something.com';
$password = 'p4ssw0rd';
$options = OP_HALFOPEN; // this should be enough to verify server present
-$retries = 0; // dont retry connect on failure
+$retries = 0; // don't retry connect on failure
$mbox = @imap_open($mailbox, $username, $password, $options, $retries);
if (!$mbox) {
if (!extension_loaded("interbase")) print "skip interbase extension not available";
require("interbase.inc");
if(!@ibase_connect($test_base)){
- die("skip cannot connnect");
+ die("skip cannot connect");
}
?>
continue;
}
- /* Error in retriving data */
+ /* Error in retrieving data */
*result = 0;
if( tag_value ){
zend_string_release_ex( tag_value, 0 );
/* }}} */
/* {{{ proto string Locale::lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])
-* Searchs the items in $langtag for the best match to the language
+* Searches the items in $langtag for the best match to the language
* range
*/
/* }}} */
/* {{{ proto string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])
-* Searchs the items in $langtag for the best match to the language
+* Searches the items in $langtag for the best match to the language
* range
*/
PHP_FUNCTION(locale_lookup)
mysql->hash_key = hash_key;
- /* check if we can reuse exisiting connection ... */
+ /* check if we can reuse existing connection ... */
if ((le = zend_hash_find_ptr(&EG(persistent_list), hash_key)) != NULL) {
if (le->type == php_le_pmysqli()) {
plist = (mysqli_plist_entry *) le->ptr;
returnValue = (sb4) Z_LVAL(retval);
}
- /* Setting params[0] to null so ressource isn't destroyed on zval_dtor */
+ /* Setting params[0] to null so resource isn't destroyed on zval_dtor */
ZVAL_NULL(¶ms[0]);
/* Cleanup */
efree(field);
RETURN_NULL();
}
- /* chop the trailing \0 by outputing only 4095 bytes */
+ /* chop the trailing \0 by outputting only 4095 bytes */
PHPWRITE(field,(rc == SQL_SUCCESS_WITH_INFO) ? 4095 : result->values[field_ind].vallen);
if (rc == SQL_SUCCESS) { /* no more data avail */
persistent connections. I think that SetStmtOption is of little use, since most
of those can only be specified before preparing/executing statements.
On the other hand, they can be made connection wide default through SetConnectOption
- - but will be overidden by calls to SetStmtOption() in odbc_prepare/odbc_do
+ - but will be overridden by calls to SetStmtOption() in odbc_prepare/odbc_do
*/
PHP_FUNCTION(odbc_setoption)
{
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
/* {{{ proto resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])
- Returns a result identifier containg the list of procedure names in a datasource */
+ Returns a result identifier containing the list of procedure names in a datasource */
PHP_FUNCTION(odbc_procedures)
{
zval *pv_conn;
/* No side effects */
return 0;
case ZEND_ROPE_END:
- /* TODO: Rope dce optmization, see #76446 */
+ /* TODO: Rope dce optimization, see #76446 */
return 1;
case ZEND_JMP:
case ZEND_JMPZ:
if (ssa_op->result_def == var_num) {
if (ssa_op->op1_def >= 0
|| ssa_op->op2_def >= 0) {
- /* we cannot remove instruction that defines other varibales */
+ /* we cannot remove instruction that defines other variables */
return 0;
} else if (opline->opcode == ZEND_JMPZ_EX
|| opline->opcode == ZEND_JMPNZ_EX
ZCG(counted) = 1;
}
- /* Revalidate acessibility of cached file */
+ /* Revalidate accessibility of cached file */
if (EXPECTED(persistent_script != NULL) &&
UNEXPECTED(ZCG(accel_directives).validate_permission) &&
file_handle->type == ZEND_HANDLE_FILENAME &&
if (len <= 2) {
return FAILURE;
}
- /* Detect double qoutes */
+ /* Detect double quotes */
if (identifier[0] == '"' && identifier[len-1] == '"') {
size_t i;
#define PGSQL_CONNECT_FORCE_NEW (1<<1)
#define PGSQL_CONNECT_ASYNC (1<<2)
/* php_pgsql_convert options */
-#define PGSQL_CONV_IGNORE_DEFAULT (1<<1) /* Do not use DEAFULT value by removing field from returned array */
+#define PGSQL_CONV_IGNORE_DEFAULT (1<<1) /* Do not use DEFAULT value by removing field from returned array */
#define PGSQL_CONV_FORCE_NULL (1<<2) /* Convert to NULL if string is null string */
#define PGSQL_CONV_IGNORE_NOT_NULL (1<<3) /* Ignore NOT NULL constraints */
#define PGSQL_CONV_OPTS (PGSQL_CONV_IGNORE_DEFAULT|PGSQL_CONV_FORCE_NULL|PGSQL_CONV_IGNORE_NOT_NULL)
$hash_avail = Phar::getSupportedSignatures();
if ($arg && !in_array('OpenSSL', $hash_avail))
{
- self::error("Cannot specifiy private key without OpenSSL support.\n");
+ self::error("Cannot specify private key without OpenSSL support.\n");
}
return $arg;
}
*
* @param string $pn
* @param string $f The file name
- * @param array $args The directory and Blen informations
+ * @param array $args The directory and Blen information
*/
public function phar_dir_extract($pn, $f, $args)
{
/**
* The cli command argument for deleting.
*
- * @return array informations about the arguments to use.
+ * @return array information about the arguments to use.
*/
static function cli_cmd_arg_delete()
{
/**
* Cli Command Inf Compress
*
- * Cli Command compress informations
+ * Cli Command compress information
*
* @return string A description of the command.
*/
var $offset = 0;
/**
- * @var string Optionnal comment to add to the zip
+ * @var string Optional comment to add to the zip
* @access private
*/
var $comment = "";
/**
* @param int $time Unix timestamp of the date to convert
- * @return the date formated as a ZIP date
+ * @return the date formatted as a ZIP date
*/
function getMTime($time)
{
zval *retval = va_arg(args, zval*);
/* under some circumstances, the properties hash table may contain numeric
- * properties (e.g. when casting from array). This is a WONT FIX bug, at
+ * properties (e.g. when casting from array). This is a WON'T FIX bug, at
* least for the moment. Ignore these */
if (hash_key->key == NULL) {
return 0;
RETURN_FALSE;
}
- /* For compatibility reason, implemeted interface is not checked */
+ /* For compatibility reason, implemented interface is not checked */
/* Find implemented methods - SessionHandlerInterface */
i = 0;
ZEND_HASH_FOREACH_STR_KEY(&php_session_iface_entry->function_table, func_name) {
ch = php_stream_getc(stream);
}
if (ch != '\n') {
- /* Somthing wrong in chunked encoding */
+ /* Something wrong in chunked encoding */
if (http_buf) {
zend_string_release_ex(http_buf, 0);
}
}
}
} else {
- /* Somthing wrong in chunked encoding */
+ /* Something wrong in chunked encoding */
if (http_buf) {
zend_string_release_ex(http_buf, 0);
}
/** keys are created from sub iterators position */
const MIT_KEYS_NUMERIC = 0;
- /** keys are created from sub iterators associated infromation */
+ /** keys are created from sub iterators associated information */
const MIT_KEYS_ASSOC = 2;
/** Construct a new empty MultipleIterator
*
* Passes the RecursiveIterator interface to the inner Iterator and provides
* the same functionality as FilterIterator. This allows you to skip parents
- * and all their childs before loading them all. You need to care about
+ * and all their children before loading them all. You need to care about
* function getChildren() because it may not always suit your needs. The
* builtin behavior uses reflection to return a new instance of the exact same
* class it is called from. That is you extend RecursiveFilterIterator and
* this does not transport any state or control information of your accept()
* implementation to the new instance. To overcome this problem you might
* need to overwrite getChildren(), call this implementation and pass the
- * control vaules manually.
+ * control values manually.
*/
class RecursiveArrayIterator extends ArrayIterator implements RecursiveIterator
{
* @param it Iterator to cache
* @param flags Bitmask:
* - CALL_TOSTRING (whether to call __toString() for every element)
- * - CATCH_GET_CHILD (whether to catch exceptions when trying to get childs)
+ * - CATCH_GET_CHILD (whether to catch exceptions when trying to get children)
*/
function __construct(RecursiveIterator $it, $flags = self::CALL_TOSTRING)
{
*
* Passes the RecursiveIterator interface to the inner Iterator and provides
* the same functionality as FilterIterator. This allows you to skip parents
- * and all their childs before loading them all. You need to care about
+ * and all their children before loading them all. You need to care about
* function getChildren() because it may not always suit your needs. The
* builtin behavior uses reflection to return a new instance of the exact same
* class it is called from. That is you extend RecursiveFilterIterator and
* this does not transport any state or control information of your accept()
* implementation to the new instance. To overcome this problem you might
* need to overwrite getChildren(), call this implementation and pass the
- * control vaules manually.
+ * control values manually.
*/
abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator
{
* @param it RecursiveIterator to iterate
* @param mode Operation mode (one of):
* - LEAVES_ONLY only show leaves
- * - SELF_FIRST show parents prior to their childs
+ * - SELF_FIRST show parents prior to their children
* - CHILD_FIRST show all children prior to their parent
* @param flags Control flags, zero or any combination of the following
* (since PHP 5.1).
*/
class SplFileObject extends SplFileInfo implements RecursiveIterator, SeekableIterator
{
- /** Flag: wheter to suppress new lines */
+ /** Flag: whether to suppress new lines */
const DROP_NEW_LINE = 0x00000001;
private $fp;
$this->attach($obj, $inf);
}
- /** @param $obj Exising object to look for
+ /** @param $obj Existing object to look for
* @return associative information stored with object
* @throw UnexpectedValueException if Object $obj is not contained in
* storage
throw new UnexpectedValueException('Object not found');
}
- /** @param $obj Exising object to look for
+ /** @param $obj Existing object to look for
* @return associative information stored with object
* @since 5.3.0
*/
}
/* {{{ proto void spl_autoload_call(string class_name)
- Try all registerd autoload function to load the requested class */
+ Try all registered autoload function to load the requested class */
PHP_FUNCTION(spl_autoload_call)
{
zval *class_name, retval;
function spl_autoload(string $class_name, string $file_extensions = NULL) {/**/};
/** @ingroup SPL
- * @brief Manual invocation of all registerd autoload functions
+ * @brief Manual invocation of all registered autoload functions
* @since PHP 5.1
*
* @param class_name name of class to load
* @brief Exception that denotes a value not in the valid domain was used.
* @since PHP 5.1
*
- * This kind of exception should be used to inform about domain erors in
+ * This kind of exception should be used to inform about domain errors in
* mathematical sense.
*
* @see RangeException
* over Arrays and Objects.
*
* When you want to iterate over the same array multiple times you need to
- * instanciate ArrayObject and let it create ArrayIterator instances that
+ * instantiate ArrayObject and let it create ArrayIterator instances that
* refer to it either by using foreach or by calling its getIterator()
* method manually.
*/
intern = Z_SPLFILESYSTEM_P(getThis());
if (intern->_path) {
- /* object is alreay initialized */
+ /* object is already initialized */
zend_restore_error_handling(&error_handling);
php_error_docref(NULL, E_WARNING, "Directory object is already initialized");
return;
}
/* }}} */
-/* overriden for garbage collection */
+/* overridden for garbage collection */
static HashTable *spl_object_storage_get_gc(zval *obj, zval **table, int *n) /* {{{ */
{
int i = 0;
LIBS="$LIBS -largon2"
AC_DEFINE(HAVE_ARGON2LIB, 1, [ Define to 1 if you have the <argon2.h> header file ])
], [
- AC_MSG_ERROR([Problem with libargon2.(a|so). Please verify that Argon2 header and libaries >= 20161029 are installed])
+ AC_MSG_ERROR([Problem with libargon2.(a|so). Please verify that Argon2 header and libraries >= 20161029 are installed])
])
fi
/*
DO NOT EDIT THIS FILE!
- it has been automaticaly created by php7/scripts/credits from
+ it has been automatically created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
/*
DO NOT EDIT THIS FILE!
- it has been automaticaly created by php7/scripts/credits from
+ it has been automatically created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
#ifdef HAVE_STRUCT_STAT_ST_RDEV
# ifdef PHP_WIN32
/* It is unsigned, so if a negative came from userspace, it'll
- convert to UINT_MAX, but we wan't to keep the userspace value.
+ convert to UINT_MAX, but we want to keep the userspace value.
Almost the same as in php_fstat. This is ugly, but otherwise
we would have to maintain a fully compatible struct stat. */
if ((int)stat_ssb.sb.st_rdev < 0) {
#ifdef HAVE_STRUCT_STAT_ST_RDEV
# ifdef PHP_WIN32
/* It is unsigned, so if a negative came from userspace, it'll
- convert to UINT_MAX, but we wan't to keep the userspace value.
+ convert to UINT_MAX, but we want to keep the userspace value.
Almost the same as in php_if_fstat. */
if ((int)stat_sb->st_rdev < 0) {
ZVAL_LONG(&stat_rdev, (int)stat_sb->st_rdev);
return 0;
}
height = (height << 7) | (i & 0x7f);
- /* maximum valid heigth for wbmp (although 127 may be a more accurate one) */
+ /* maximum valid height for wbmp (although 127 may be a more accurate one) */
if (height > 2048) {
return 0;
}
TODO:
- Create php_readlink (done), php_link (done) and php_symlink (done) in win32/link.c
- Expose them (PHPAPI) so extensions developers can use them
-- define link/readlink/symlink to their php_ equivalent and use them in ext/standart/link.c
+- define link/readlink/symlink to their php_ equivalent and use them in ext/standard/link.c
- this file is then useless and we have a portable link API
*/
}
/* }}} */
-/* {{{ proto int stream_socket_sendto(resouce stream, string data [, int flags [, string target_addr]])
+/* {{{ proto int stream_socket_sendto(resource stream, string data [, int flags [, string target_addr]])
Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format */
PHP_FUNCTION(stream_socket_sendto)
{
If imporper $content type is specified, file is created as empty
$size = size of the fill in terms of kilobyte, i.e size of the file.
if $flag is specified as "byte", then then given size is taken in bytes
- $flag = specifiy if size has to be treated as no of total bytes or
+ $flag = specify if size has to be treated as no of total bytes or
multiple of KB.
"kilobytes" = take size in terms of multiple of KB
"byte" = take size in terms of bytes
}
/**
- * Get the mailbox name from a mailbox decription, i.e strip off server details.
+ * Get the mailbox name from a mailbox description, i.e strip off server details.
*
* @param string mailbox complete mailbox name
* @return mailbox name
$username = 'webmaster@example.com';
$password = 'p4ssw0rd';
$options = OP_HALFOPEN; // this should be enough to verify server present
-$retries = 0; // dont retry connect on failure
+$retries = 0; // don't retry connect on failure
$mbox = imap_open($mailbox, $username, $password, $options, $retries);
if (!$mbox) {
/* }}} */
/* {{{ proto resource ZipArchive::statIndex(int index[, int flags])
-Returns the zip entry informations using its index */
+Returns the zip entry information using its index */
static ZIPARCHIVE_METHOD(statIndex)
{
struct zip *intern;
/* {{{ proto bool ZipArchive::extractTo(string pathto[, mixed files])
Extract one or more file from a zip archive */
/* TODO:
- * - allow index or array of indeces
+ * - allow index or array of indices
* - replace path
* - patterns
*/
#ifdef ZEND_WIN32
/* Until the current ini values was setup, the current cp is 65001.
- If the actual ini vaues are different, some stuff needs to be updated.
+ If the actual ini values are different, some stuff needs to be updated.
It concerns at least main_cwd_state and there might be more. As we're
still in the startup phase, lets use the chance and reinit the relevant
item according to the current codepage. Still, if ini_set() is used
}
/* {{{ void php_output_startup(void)
- * Set up module globals and initalize the conflict and reverse conflict hash tables */
+ * Set up module globals and initialize the conflict and reverse conflict hash tables */
PHPAPI void php_output_startup(void)
{
ZEND_INIT_MODULE_GLOBALS(output, php_output_init_globals, NULL);
as needed and allows a maximum setting as snprintf (turn this feature
off by setting max_len to 0). spprintf is a little bit slower than
snprintf and offers possible memory leakes if you miss freeing the
- buffer allocated by the function. Therfore this function should be
+ buffer allocated by the function. Therefore this function should be
used where either no maximum is known or the maximum is much bigger
than normal size required. spprintf always terminates the buffer.
/* The filter API works on the principle of "Bucket-Brigades". This is
* partially inspired by the Apache 2 method of doing things, although
- * it is intentially a light-weight implementation.
+ * it is intentionally a light-weight implementation.
*
* Each stream can have a chain of filters for reading and another for writing.
*
filenames to generate with <tdir>. If --html is being used and
<url> given then the generated links are relative and prefixed
with the given url. In general you want to make <sdir> the path
- to your source files and <tdir> some pach in your web page
+ to your source files and <tdir> some patch in your web page
hierarchy with <url> pointing to <tdir>.
--keep-[all|php|skip|clean]
* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
}
}
- /* iterate throught triggered events */
+ /* iterate through triggered events */
for (i = 0; i < ret; i++) {
/* find the corresponding event */
{
struct pollfd pollfd;
- /* fill pollfd with event informations */
+ /* fill pollfd with event information */
pollfd.fd = ev->fd;
pollfd.events = POLLIN;
pollfd.revents = 0;
{
struct pollfd pollfd;
- /* fill pollfd with the same informations as fpm_event_devpoll_add */
+ /* fill pollfd with the same information as fpm_event_devpoll_add */
pollfd.fd = ev->fd;
pollfd.events = POLLIN | POLLREMOVE;
pollfd.revents = 0;
snprintf(buf, sizeof(buf), "with code %d", WEXITSTATUS(status));
/* if it's been killed because of dynamic process management
- * don't restart it automaticaly
+ * don't restart it automatically
*/
if (child && child->idle_kill) {
restart_child = 0;
snprintf(buf, sizeof(buf), "on signal %d (%s%s)", WTERMSIG(status), signame, have_core);
/* if it's been killed because of dynamic process management
- * don't restart it automaticaly
+ * don't restart it automatically
*/
if (child && child->idle_kill && WTERMSIG(status) == SIGQUIT) {
restart_child = 0;
* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
static const char *requests_stages[] = {
[FPM_REQUEST_ACCEPTING] = "Idle",
[FPM_REQUEST_READING_HEADERS] = "Reading headers",
- [FPM_REQUEST_INFO] = "Getting request informations",
+ [FPM_REQUEST_INFO] = "Getting request information",
[FPM_REQUEST_EXECUTING] = "Running",
[FPM_REQUEST_END] = "Ending",
[FPM_REQUEST_FINISHED] = "Finishing",
}
/**
- * Get Informations on the FastCGI application
+ * Get Information on the FastCGI application
*
* @param array $requestedInfo information to retrieve
* @return array
/* Key for each cache entry is dirname(PATH_TRANSLATED).
*
* NOTE: Each cache entry config_hash contains the combination from all user ini files found in
- * the path starting from doc_root throught to dirname(PATH_TRANSLATED). There is no point
+ * the path starting from doc_root through to dirname(PATH_TRANSLATED). There is no point
* storing per-file entries as it would not be possible to detect added / deleted entries
* between separate files.
*/
}
/* ", " separated matches */
- phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambigious, matching %lu commands (%s)", name->str, matches, list);
+ phpdbg_error("command", "type=\"ambiguous\" command=\"%s\" matches=\"%lu\" matched=\"%s\"", "The command \"%s\" is ambiguous, matching %lu commands (%s)", name->str, matches, list);
efree(list);
return NULL;
" Enable refcount display when hitting watchpoints" CR CR
" $P S b 4 off" CR
-" Temporarily disable breakpoint 4. This can be subsequently reenabled by a **S b 4 on**." CR
+" Temporarily disable breakpoint 4. This can be subsequently re-enabled by a **S b 4 on**." CR
//*********** check oplog syntax
},
PHPDBG_COMMAND_D(back, "show trace", 't', NULL, "|n", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(frame, "switch to a frame", 'f', NULL, "|n", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(list, "lists some code", 'l', phpdbg_list_commands, "*", PHPDBG_ASYNC_SAFE),
- PHPDBG_COMMAND_D(info, "displays some informations", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE),
+ PHPDBG_COMMAND_D(info, "displays some information", 'i', phpdbg_info_commands, "|s", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(clean, "clean the execution environment", 'X', NULL, 0, 0),
PHPDBG_COMMAND_D(clear, "clear breakpoints", 'C', NULL, 0, 0),
PHPDBG_COMMAND_D(help, "show help menu", 'h', phpdbg_help_commands, "|s", PHPDBG_ASYNC_SAFE),
* Watch elements are either simple, recursive or implicit (PHPDBG_WATCH_* flags)
* Simple means that a particular watchpoint was explicitly defined
* Recursive watch elements are created recursively (recursive root flag is to distinguish the root element easily from its children recursive elements)
- * Implicit watch elements are implicitely created on all ancestors of simple or recursive watch elements
+ * Implicit watch elements are implicitly created on all ancestors of simple or recursive watch elements
* Recursive and (simple or implicit) watch elements are mutually exclusive
* Array/Object to distinguish watch elements on arrays
*
- <watchhit variable="" />: when ever a watched variable is changed, followed by a <watchdata> container
- <watchdata> may contain
- for watchpoints on variables:
- - each of these <watch*> tags conatins a type attribute whose value is either "old" or "new")
+ - each of these <watch*> tags contains a type attribute whose value is either "old" or "new")
- <watchvalue type="" inaccessible="inaccessible" />: old value is inaccessible
- <watchvalue type=""> may contain a <stream> element which indicates the old/new (type attribute) value of the variable
- <watchrefcount type="" refcount="" isref="" />: old/new (type attribute) refcount and isref, both numbers
/*
DO NOT EDIT THIS FILE!
- it has been automaticaly created by php7/scripts/credits from
+ it has been automatically created by php7/scripts/credits from
the information found in the various php7/ext/.../CREDITS and
php7/sapi/.../CREDITS files
$this->showstatus($section_text['TEST'], 'SKIPPED', 'CGI Test needs CGI Binary');
return "SKIPPED";
}
- // if we're doing web testing, then we wont be able to set
+ // if we're doing web testing, then we won't be able to set
// ini setting on the command line. be sure the executables
// ini settings are compatible with the test, or skip
if (($docgi || $this->conf['TEST_WEB']) &&
--TEST--
-ZE2 An abstract class cannot be instanciated
+ZE2 An abstract class cannot be instantiated
--FILE--
<?php
class test extends base {
public $b = 'test';
- // reenable cloning
+ // re-enable cloning
public function __clone() {}
public function show() {
// This test checks for:
// - inherited constructors/destructors are not called automatically
// - base classes know about derived properties in constructor/destructor
-// - base class constructors/destructors know the instanciated class name
+// - base class constructors/destructors know the instantiated class name
class base {
public $name;
ob_end_flush();
-echo "\ncheck that we dont have a reference\n";
+echo "\ncheck that we don't have a reference\n";
ob_start();
echo "Hello World\n";
$hello2 = ob_get_contents();
string(12) "Hello World
"
-check that we dont have a reference
+check that we don't have a reference
Hello World
string(12) "Hello World
"
* has been removed (MIME and file attachments). This code was
* modified from code based on code written by Jarle Aase.
*
- * This class is based on the original code by Jarle Aase, see bellow:
+ * This class is based on the original code by Jarle Aase, see below:
* wSendmail.cpp It has been striped of some functionality to match
* the requirements of phpfi.
*
/* '*error_message' has to be passed around from php_mail() */
#define SMTP_ERROR_RESPONSE_SPEC "SMTP server response: %s"
-/* Convinient way to handle error messages from the SMTP server.
+/* Convenient way to handle error messages from the SMTP server.
response is ecalloc()d in Ack() itself and efree()d here
because the content is in *error_message now */
#define SMTP_ERROR_RESPONSE(response) { \