Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #10062
| Message-ID | <5479816.A5F48n2xs2@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-07-10 22:25 +0200 |
| Subject | Re: How can i get value of text area? |
| Newsgroups | comp.lang.php |
| References | <d4d1b24a-9d60-4d25-8949-5fbf65d1fb27@googlegroups.com> |
sanjayrathod273@gmail.com wrote: > i have two files > 1)index.php > and > 2)code.js No, you have copied them from <http://web.guru99.com/data-types-variables-and-operators/> without telling us (or them). You cannot simply copy the client-side code from a PHP-powered Web site (they are using WordPress, but the editor makes it clear already) and expect it to work the same at your box. Also, you MUST NOT do that (except perhaps for non-public use; check your local Copyright laws – IANAL). But any Web site that makes claims like | PHP is a loosely typed language; it does not have explicit defined data | types. | | PHP determines the data types by analyzing the attributes of data | supplied. | | PHP implicitly supports the following data types […] is not to be trusted anyway. PHP is _not_ a “loosely typed” language (that term is “loosely *defined*” itself; avoid it). It is a language with dynamic type-checking (at runtime, as opposed to static type-checking at compile-time). That means it *has* “explicit defined data types”, but that symbols (variables, array member, classes, properties) do not have a type as in “is declared as” or “enforce” (at *compile time*), and that *values* have a type instead. The type of the symbol is defined by the value it stores or refers to, at *runtime*. In some cases, as with type hinting and setters/getters, more strict type-checking or implicit type conversion, can be enforced on function parameters and properties. As such, PHP without type hinting can be called a “weakly typed” language according to Liskov and Zilles, and Jackson (referred in [1]). Data types are supported in PHP *explicitly*. Each PHP value has a type in the Zend2 PHP engine: <http://www.php.net/manual/en/internals2.variables.intro.php> etc. So the gettype() function does _not_ “[analyze] the attributes of data supplied”, it just reads the “type” member of the zval and maps it to a human-readable string value. As with other languages with dynamic type-checking (such as ECMAScript implementations like JavaScript, for a prominent example), implicit type *conversion* (in PHP also called “type juggling”) is performed with certain operators: <http://www.php.net/manual/en/language.types.php> You are better off reading <http://php.net/manual>, asking specific questions in this newsgroup, or taking a PHP class at Zend.com than reading this tutorial. And you will learn more about PHP by setting it up on your computer than by using a Web editor. PointedEars ___________ [1] <http://en.wikipedia.org/wiki/Strong_and_weak_typing> -- When all you know is jQuery, every problem looks $(olvable).
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
How can i get value of text area? sanjayrathod273@gmail.com - 2013-07-09 04:55 -0700 Re: How can i get value of text area? Jerry Stuckle <jstucklex@attglobal.net> - 2013-07-09 08:07 -0400 Re: How can i get value of text area? bill <william@TechServSys.com> - 2013-07-09 10:12 -0400 Re: How can i get value of text area? Denis McMahon <denismfmcmahon@gmail.com> - 2013-07-09 15:44 +0000 Re: How can i get value of text area? Christoph Michael Becker <cmbecker69@arcor.de> - 2013-07-10 02:02 +0200 Re: How can i get value of text area? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-07-10 22:25 +0200
csiph-web