A
A
Aquahawk2011-02-16 15:27:54
PHP
Aquahawk, 2011-02-16 15:27:54

PHP syntax books for experienced programmer in other languages

Recommend books for experienced programmers. Those. I don’t want to read half the book why a for is needed, what an iterator is, how a class differs from an object, and other things that are the same in all languages, and especially about the principles of OOP, they like to write this in every book now. There are 4 years of programming experience in C ++ and half a year in as3. Actually, I work with php on the little things, in principle, everything is normal and understandable, with the exception of some points. I would like a book that will not tell why I need a cycle, but will tell how the iterator works in foreach and that it works with copies of objects and not with references to them (this surprised me a lot, I set a property in foreach and there is nothing on the output). And other subtleties. For example when objects are deleted. When do extra copies occur and how to avoid them.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
T
try4tune, 2011-02-16
@Aquahawk

Read the Zend PHP Certification Study Guide. This guide to preparing for certification, perfectly describes the features of the language. But there may not be enough information there.

G
gro, 2011-02-16
@gro

If the theory is not needed, then the documentation will tell the subtleties .

H
Hint, 2011-02-16
@Hint

I also had superficial knowledge of PHP and I wanted to streamline and expand them.
I read Koterov's book, everything cleared up in my head. True, it was a long time ago and I don’t remember exactly how much information there is for novice programmers. But then I liked the book as a whole.
Book on Ozone:
www.ozon.ru/context/detail/id/4030251/

A
Anatoly, 2011-02-16
@taliban

Take any guide from orelie, everything is usually short and on the shelves. Considering that you are fluent in C++, this will be enough for you.

C
Count3r, 2011-02-16
@Count3r

PHP 5 in the original is quite good. Expressions, constants, data types, arrays, working with databases, OOP, etc.

V
Vyacheslav Plisko, 2011-02-20
@AmdY

due to the presence of an excellent manual on php.net with comments, there is no point in retelling it in books, so the books are either superficial for dummies, or related to patterns and architecture.
I usually say that two books on php are worth reading - the first and Schlossneigl (J. Schlossneigl "Professional PHP Programming").
I will answer questions because you have errors.
foreach uses lazy copying, variables are only copied on change, but objects are passed by reference since version 5.0 For objects, you can connect the Iterator interface from SPL
Variables and objects are deleted when references to them are set to 0, the __destruct method is triggered when they are deleted, a garbage collector appeared in 5.3. but the main feature of php is that you should not try to delete variables yourself, if it is not cli, then let php clean everything up after the script is finished, the overhead will not be sensitive because of this. about copying, you need to know one useful feature - the extension can work with memory in its own way and thereby bypasses the memory_limit limit and the process starts to get fat, but at the same time memory_get_usage will be silent like a partisan.
I worked with a developer who programmed on the pros. The main problem is re-optimization, which results in a lot of code, the code is confusing and difficult to maintain, the worst of all is the constant desire to save on associative arrays. Apart from cli applications, php, even with the most gouging coding, will not eat up all the RAM and percent, the weak point is the storage, width and speed of the data transfer channel. This is true for the vast majority of applications.
with questions better on phpclub.ru, we may not be the most friendly forum, but professional.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question