FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » A Few Noob Questions
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: A Few Noob Questions [message #175128 is a reply to message #175127] Tue, 16 August 2011 15:11 Go to previous messageGo to previous message
A.Reader is currently offline  A.Reader
Messages: 15
Registered: December 2010
Karma:
Junior Member
On Tue, 16 Aug 2011 11:02:40 -0400,
"eBob.com" <eBob(dot)com(at)totallybogus(dot)com> wrote:

> Is "script" official terminology in PHP? The book I am reading says
> "Built-in superglobal variables are visible everywhere within a script." but
> has never explicitly defined "script". (Although there is a hint that maybe
> everything between tags is a script.)

"Script" in this context is a synonym for "program". Some people
seem to need to make things confusing by giving new names to old
concepts.

>
> How can the "units" of PHP between tags communicate? Can my PHP code create
> $GLOBALS variables? How about $_SESSION variables?

You'll have to ask the question in a different way.

>
> The book gives the following example of a ternary operator:
>
> ($grade >= 50 ? 'Passed" : "Failed")
>
> I don't understand the function of the enclosing parentheses. The official
> doc at php.net doesn't seem to suggest that the parentheses are necessary.

The parens encapsulate the expression/statement, and prevent the
compiler from getting confused. You'll see similar uses in other
contexts.

>
> Just to make sure, "@" only suppresses MESSAGES. It does not interfere with
> try/catch logic/code. Right?

Right.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to integrate paypal payment Indian currency support ..?
Next Topic: Looking for good C and C++ PHP plugin examples
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 19:22:22 GMT 2024

Total time taken to generate the page: 0.03482 seconds