com php-langspec: Fix some references: spec/04-basic-concepts.md spec/07-variables.md spec/10-expressions.md spec/11-statements.md spec/12-arrays.md
spec/14-classes.md

From: Date: Tue, 19 Sep 2017 09:46:34 +0000
Subject: com php-langspec: Fix some references: spec/04-basic-concepts.md spec/07-variables.md spec/10-expressions.md spec/11-statements.md spec/12-arrays.md
spec/14-classes.md
Groups: php.standards.cvs 
Request: Send a blank email to standards--cvs+get-402@lists.php.net to get a copy of this message
Commit: 1baff2105284c1e964de18fc7d40d7b1dc6900a0 Author: Nikita Popov <nikic@php.net> Tue, 19 Sep 2017 11:44:28 +0200 Parents: cbb78dacad82dfc11e12399ab076d023f8efea69 Branches: master Link: http://git.php.net/?p=php-langspec.git;a=commitdiff;h=1baff2105284c1e964de18fc7d40d7b1dc6900a0 Log: Fix some references These got left behind after shuffling things around too much. Changed paths: M spec/04-basic-concepts.md M spec/07-variables.md M spec/10-expressions.md M spec/11-statements.md M spec/12-arrays.md M spec/14-classes.md

diff --git a/spec/04-basic-concepts.md b/spec/04-basic-concepts.md index 9887815..bdb84eb 100644 --- a/spec/04-basic-concepts.md +++ b/spec/04-basic-concepts.md @@ -43,7 +43,8 @@ text: All of the sections in a script are treated as though they belonged to one continuous section, except that any intervening text is treated as -though it were a string literal given to the [intrinsic `echo`](10-expressions.md#echo). +though it were a string literal given to the +[`echo` statement](11-statements.md#the-echo-statement). A script can import another script via a [script inclusion operator](10-expressions.md#script-inclusion-operators). @@ -51,8 +52,8 @@ A script can import another script via a [script inclusion operator](10-expressi The top level of a script is simply referred to as the *top level*. -If `<?=` is used as the *start-tag*, the Engine proceeds as if the *statement-list* started with [echo](10-expressions.md#echo) -statement. +If `<?=` is used as the *start-tag*, the Engine proceeds as if the *statement-list* started with an +[echo](11-statements.md#the-echo-statement) statement. ## Program Start-Up A program begins execution at the start of a [script](#program-structure) designated in @@ -73,7 +74,8 @@ in which it executes. When a [top level](#program-structure) is the main entry point for a script, it gets the global variable [scope](#scope). When a top level is invoked via -[`include/require`](10-expressions.md#general-6), it inherits the variable scope of its caller. Thus, +[`include/require`](10-expressions.md#script-inclusion-operators), +it inherits the variable scope of its caller. Thus, when looking at one script's top level in isolation, it's not possible to tell statically whether it will have the global variable scope or some local variable scope. It depends on how the @@ -256,7 +258,7 @@ of which (except `unset`) use the & punctuator: - [byRef value in a foreach statement](11-statements.md#the-foreach-statement). - [byRef initializer for an array element](10-expressions.md#array-creation-operator). - [byRef variable-use list in an anonymous function](10-expressions.md#anonymous-function-creation). -- [unset](10-expressions.md#unset). +- [unset](11-statements.md#the-unset-statement). ### Reclamation and Automatic Memory Management The Engine is required to manage the lifetimes of VStores and HStores @@ -272,7 +274,7 @@ Before reclaiming an HStore that represents an [object](05-types.md#objects), the Engine should invoke the object's [destructor](14-classes.md#constructors) if one is defined. The Engine must reclaim each VSlot when the [storage duration](#storage-duration) of its -corresponding variable ends, when the variable is explicitly [unset](10-expressions.md#unset) by the +corresponding variable ends, when the variable is explicitly [unset](11-statements.md#the-unset-statement) by the programmer, or when the script exits, whichever comes first. In the case where a VSlot is contained within an HStore, the engine must immediately reclaim the VSlot when it is explicitly unset by the programmer, when the containing HStore is reclaimed, @@ -1376,7 +1378,7 @@ Engine via its garbage-collection process and the use of storage duration: [array elements](07-variables.md#array-elements) and [instance properties](07-variables.md#instance-properties). Although all three storage durations have default ends-of-life, their -lives can be shortened by calling the intrinsic [`unset`](10-expressions.md#unset), +lives can be shortened by using the [`unset` statement](11-statements.md#the-unset-statement), which destroys any given set of variables. The following example demonstrates the three storage durations: diff --git a/spec/07-variables.md b/spec/07-variables.md index 1e81099..43f6dd0 100644 --- a/spec/07-variables.md +++ b/spec/07-variables.md @@ -3,7 +3,7 @@ ## General A *variable* is a named area of data storage that contains a PHP value. A variable is represented by a [VSlot](04-basic-concepts.md#general). A variable is created by [assigning a value](04-basic-concepts.md#assignment) to it. -A variable is destroyed by *unsetting* it, either by an explicit call to the intrinsic [`unset`](10-expressions.md#unset), or by the Engine. The intrinsic [`isset`](10-expressions.md#isset) tests if a given variable exists and is not set to `NULL`. +A variable is destroyed by *unsetting* it, either by an explicit call to the [`unset` statement](11-statements.md#the-unset-statement), or by the Engine. The intrinsic [`isset`](10-expressions.md#isset) tests if a given variable exists and is not set to `NULL`. If a variable, which is not defined so far, is used in an expression, then different strategies are applied which determine whether the variable is defined implicitly or a substitution value is used instead and whether a notice is emitted or not. The strategies depend on the kind of the variable as well as on the context where the undefined variable is being used. The strategies are elaborated in the sub-sections of the different [kinds of variables](#kinds-of-variables) below. Variables have [names](09-lexical-structure.md#names). Distinct variables may have @@ -221,7 +221,7 @@ $l = $k; // a VSlot for $l was created and the value of $k (which is NULL) may be created for that array. New elements are inserted into an existing array via the [simple-assignment operator](10-expressions.md#simple-assignment) in conjunction with the subscript [operator `[]`](10-expressions.md#subscript-operator). Elements can be -removed by calling the [`unset` intrinsic](10-expressions.md#unset). +removed by calling the [`unset` statement](11-statements.md#the-unset-statement). **Semantics** @@ -310,7 +310,7 @@ A function static has function [scope](04-basic-concepts.md#scope) and static [s The value of a function static is retained across calls to its parent function. Each time the function containing a function static declaration is called, that execution is dealing with an [alias](04-basic-concepts.md#general) -to that static variable. If that alias is passed to the [`unset` intrinsic](10-expressions.md#unset), +to that static variable. If that alias is passed to the [`unset` statement](11-statements.md#the-unset-statement), only that alias is destroyed. The next time that function is called, a new alias is created. **Undefined Function Statics** @@ -402,7 +402,7 @@ A global variable has global [scope](04-basic-concepts.md#scope) and static When a global value is imported into a function, each time the function is called, that execution is dealing with an [alias](04-basic-concepts.md#general) to that -global variable. If that alias is passed to the [`unset` intrinsic](10-expressions.md#unset), +global variable. If that alias is passed to the [`unset` statement](11-statements.md#the-unset-statement), only that alias is destroyed. The next time that function is called, a new alias is created with the current value of the global variable. diff --git a/spec/10-expressions.md b/spec/10-expressions.md index 8cf1ae8..73bbe8a 100644 --- a/spec/10-expressions.md +++ b/spec/10-expressions.md @@ -543,8 +543,8 @@ a [`__toString` method](14-classes.md#method-__tostring). After converting its *expression*'s value to a string, if necessary, `print` writes the resulting string to [`STDOUT`](06-constants.md#core-predefined-constants). -Unlike [`echo`](#echo), `print` can be used in any context allowing an expression. It -always returns the value 1. +Unlike [`echo`](11-statements.md#the-echo-statement), `print` can be used in any context +allowing an expression. It always returns the value 1. See also: [double quoted strings](09-lexical-structure.md#double-quoted-string-literals) and [heredoc documents](09-lexical-structure.md#heredoc-string-literals), [conversion to string](08-conversions.md#converting-to-string-type). @@ -1947,7 +1947,7 @@ A *cast-type* of `object` results in a [conversion to type `object`](08-conversi A *cast-type* of `string` results in a [conversion to type `string`](08-conversions.md#converting-to-string-type). A *cast-type* of `unset` always results in a value of `NULL`. (This use of -`unset` should not be confused with the [`unset` intrinsic](#unset). +`unset` should not be confused with the [`unset` statement](11-statements.md#the-unset-statement). **Examples** diff --git a/spec/11-statements.md b/spec/11-statements.md index 2ecec51..f3aa778 100644 --- a/spec/11-statements.md +++ b/spec/11-statements.md @@ -989,7 +989,8 @@ If an uncaught exception exists when a finally-block is executed, if that finally-block executes a `return` statement, the uncaught exception is discarded. -A `return` statement may occur in a script outside any function. In an [included file](10-expressions.md#general-6), +A `return` statement may occur in a script outside any function. In an +[included file](10-expressions.md#script-inclusion-operators), such statement terminates processing of that script file and returns control to the including file. If *expression* is present, that is the value returned; otherwise, the value `NULL` is returned. If diff --git a/spec/12-arrays.md b/spec/12-arrays.md index 66066a9..0297c36 100644 --- a/spec/12-arrays.md +++ b/spec/12-arrays.md @@ -14,7 +14,7 @@ elements in the map is the order in which the elements were *inserted* into the array. An element is said to *exist* once it has been inserted into the array with a corresponding key. An array is *extended* by initializing a previously non-existent element using a new key. Elements -can be *removed* from an array via the intrinsic [`unset`](10-expressions.md#unset). +can be *removed* from an array via the [`unset` statement](11-statements.md#the-unset-statement). The [`foreach` statement](11-statements.md#the-foreach-statement) can be used to iterate over the collection of elements in an array in order. This statement also provides a way to access the key and value diff --git a/spec/14-classes.md b/spec/14-classes.md index 384181e..341bfb0 100644 --- a/spec/14-classes.md +++ b/spec/14-classes.md @@ -361,7 +361,7 @@ the instance method [`__get`](#method-__get), which treats that name as designating a dynamic property of the instance being operated on, and gets its value. In the case of the call to the intrinsic [`isset`](10-expressions.md#isset), this generates a call to the instance method [`__isset`](#method-__isset), -while a call to the intrinsic [`unset`](10-expressions.md#unset) generates a +while a use of the [`unset` statement](11-statements.md#the-unset-statement) generates a call to the instance method [`__unset`](#method-__unset). By defining these four special methods, the implementer of a class can control how dynamic properties are handled. @@ -539,7 +539,7 @@ implies public visibility. The `static` modifier defines the member as a [static The *property-initializer* for instance properties is applied prior to the class's [constructor](#constructors) being called. -An instance property that is visible may be [`unset`](10-expressions.md#unset), in which +An instance property that is visible may be [`unset`](11-statements.md#the-unset-statement), in which case, the property is actually removed from that instance. **Examples** @@ -1575,7 +1575,7 @@ If the [dynamic property](#dynamic-members) designated by `$name` exists, it is removed by this instance method; otherwise, the call has no effect. No value is expected to be returned. -Typically, `__unset` is called implicitly, when the intrinsic [`unset`](10-expressions.md#unset) +Typically, `__unset` is called implicitly, when the [`unset` statement](11-statements.md#the-unset-statement) is called with an argument that designates a property that is not visible.
« previous php.standards.cvs (#402) next »