Skip to Content
Core PHP Programming, Third Edition
book

Core PHP Programming, Third Edition

by Leon Atkinson
August 2003
Intermediate to advanced
1104 pages
19h 27m
English
Pearson
Content preview from Core PHP Programming, Third Edition

2.3. Variables

Although you've seen variables in the previous pages, you may wonder what they are exactly. Variables in PHP give you access to memory storage in a part of a computer called RAM, or random access memory. RAM is a volatile medium for storing information. That is, it all disappears when you shut off the machine. The computer sees this memory as a long array of memory cells that reside in sequential addresses. In PHP, however, you cannot actually get to memory at this level. You must use a variable. When you assign a value to a variable with $result = 2 + 5, or retrieve the value of a variable with print($result), PHP takes care of matching the variable name you specified with the right piece of memory in RAM.

Every use of a variable ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming PHP, 3rd Edition

Programming PHP, 3rd Edition

Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre
Programming PHP

Programming PHP

Rasmus Lerdorf, Kevin Tatroe
Programming PHP, 2nd Edition

Programming PHP, 2nd Edition

Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre
Advanced PHP Programming

Advanced PHP Programming

George Schlossnagle

Publisher Resources

ISBN: 0130463469Purchase book