@@ -63,7 +63,7 @@ $täyte = 'mansikka'; // valid; 'ä' is (Extended) ASCII 228.
6363
6464 <para >
6565 By default, variables are always assigned by value. That is to say,
66- when you assign an expression to a variable, the entire value of
66+ when an expression is assigned to a variable, the entire value of
6767 the original expression is copied into the destination
6868 variable. This means, for instance, that after assigning one
6969 variable's value to another, changing one of those variables will
@@ -272,8 +272,8 @@ test();
272272 such diagnostics then nothing at all will be outputted.
273273 This is because the echo statement
274274 refers to a local version of the <varname >$a</varname > variable,
275- and it has not been assigned a value within this scope. You may
276- notice that this is a little bit different from the C language in
275+ and it has not been assigned a value within this scope.
276+ Note that this is a little bit different from the C language in
277277 that global variables in C are automatically available to
278278 functions unless specifically overridden by a local definition.
279279 This can cause some problems in that people may inadvertently
@@ -440,7 +440,7 @@ function test()
440440 Static variables also provide one way to deal with recursive
441441 functions. A recursive function is one which calls itself. Care
442442 must be taken when writing a recursive function because it is
443- possible to make it recurse indefinitely. You must make sure you
443+ possible to make it recurse indefinitely. It has to be ensured to
444444 have an adequate way of terminating the recursion. The following
445445 simple function recursively counts to 10, using the static
446446 variable <varname >$count</varname > to know when to stop:
@@ -469,7 +469,7 @@ function test()
469469 </para >
470470
471471 <para >
472- Prior to PHP 8.3.0, you could only initialize a static variable using
472+ Prior to PHP 8.3.0, static variables could only be initialized using
473473 a constant expression. As of PHP 8.3.0, dynamic expressions
474474 (e.g. function calls) are also allowed:
475475 </para >
@@ -640,8 +640,8 @@ Static object: object(stdClass)#3 (1) {
640640
641641 <simpara >
642642 This example demonstrates that when assigning a reference to a static
643- variable, it's not <emphasis >remembered</emphasis > when you call the
644- <literal >& get_instance_ref()</literal > function a second time.
643+ variable, it is not <emphasis >remembered</emphasis > when the
644+ <literal >& get_instance_ref()</literal > function is called a second time.
645645 </simpara >
646646 </sect2 >
647647 </sect1 >
@@ -718,11 +718,11 @@ echo "$a $hello";
718718 </simpara >
719719
720720 <simpara >
721- In order to use variable variables with arrays, you have to
722- resolve an ambiguity problem. That is, if you write
723- <varname >$$a[1]</varname > then the parser needs to know if you
724- meant to use <varname >$a[1]</varname > as a variable, or if you
725- wanted <varname >$$a</varname > as the variable and then the [1]
721+ In order to use variable variables with arrays,
722+ an ambiguity problem has to be resolved . That is, if the parser sees
723+ <varname >$$a[1]</varname > then it needs to know if
724+ <varname >$a[1]</varname > was meant to be used as a variable, or if
725+ <varname >$$a</varname > was wanted as the variable and then the < literal > [1]</ literal >
726726 index from that variable. The syntax for resolving this ambiguity
727727 is: <varname >${$a[1]}</varname > for the first case and
728728 <varname >${$a}[1]</varname > for the second.
@@ -731,7 +731,7 @@ echo "$a $hello";
731731 <simpara >
732732 Class properties may also be accessed using variable property names. The
733733 variable property name will be resolved within the scope from which the
734- call is made. For instance, if you have an expression such as
734+ call is made. For instance, if there is an expression such as
735735 <varname >$foo->$bar</varname >, then the local scope will be examined for
736736 <varname >$bar</varname > and its value will be used as the name of the
737737 property of <varname >$foo</varname >. This is also true if
@@ -824,7 +824,7 @@ I am r.
824824 </para >
825825
826826 <para >
827- There are only two ways to access data from your HTML forms.
827+ There are only two ways to access data from HTML forms.
828828 Currently available methods are listed below:
829829 </para >
830830
@@ -843,8 +843,8 @@ echo $_REQUEST['username'];
843843 </para >
844844
845845 <para >
846- Using a GET form is similar except you'll use the appropriate
847- GET predefined variable instead. GET also applies to the
846+ Using a GET form is similar except the appropriate
847+ GET predefined variable can be used instead. GET also applies to the
848848 <literal >QUERY_STRING</literal > (the information after the '?' in a URL). So,
849849 for example, <literal >http://www.example.com/test.php?id=3</literal >
850850 contains GET data which is accessible with <varname >$_GET['id']</varname >.
@@ -861,9 +861,9 @@ echo $_REQUEST['username'];
861861
862862 <simpara >
863863 PHP also understands arrays in the context of form variables
864- (see the <link linkend =" faq.html" >related faq</link >). You may,
865- for example, group related variables together, or use this
866- feature to retrieve values from a multiple select input. For
864+ (see the <link linkend =" faq.html" >related faq</link >).
865+ For example, related variables may be grouped together, or this
866+ feature may be used to retrieve values from a multiple select input. For
867867 example, let's post a form to itself and upon submission display
868868 the data:
869869 </simpara >
@@ -941,7 +941,7 @@ if ($_POST) {
941941 PHP transparently supports HTTP cookies as defined by <link
942942 xlink : href =" &url.rfc; 6265" >RFC 6265</link >. Cookies are a
943943 mechanism for storing data in the remote browser and thus
944- tracking or identifying return users. You can set cookies using
944+ tracking or identifying return users. It is possible to set cookies using
945945 the <function >setcookie</function > function. Cookies are part of
946946 the HTTP header, so the SetCookie function must be called before
947947 any output is sent to the browser. This is the same restriction
@@ -960,8 +960,8 @@ if ($_POST) {
960960 </note >
961961
962962 <simpara >
963- If you wish to assign multiple values to a single cookie variable, you
964- may assign it as an array. For example:
963+ If multiple values should be assigned to a single cookie variable,
964+ they can be assigned as an array. For example:
965965 </simpara >
966966
967967 <informalexample >
@@ -977,16 +977,16 @@ if ($_POST) {
977977
978978 <simpara >
979979 That will create two separate cookies although <varname >MyCookie</varname > will now
980- be a single array in your script. If you want to set just one cookie
981- with multiple values, consider using <function >serialize</function > or
980+ be a single array in the script. If just one cookie should be set
981+ with multiple values, consider using <function >serialize</function > or
982982 <function >explode</function > on the value first.
983983 </simpara >
984984
985985 <simpara >
986986 Note that a cookie will replace a previous cookie by the same
987- name in your browser unless the path or domain is different. So,
988- for a shopping cart application you may want to keep a counter
989- and pass this along. i .e.
987+ name in the browser unless the path or domain is different. So,
988+ for a shopping cart application a counter may be kept,
989+ and passed along. I .e.
990990 </simpara >
991991
992992 <example >
0 commit comments