Want to understand a certain PHP programming technique? Or learn how to accomplish a particular task? This cookbook is the first place to look. With more than 350 code-rich recipes revised for PHP 5.4 and 5.5, this third edition provides updated solutions for generating dynamic web content—everything from using basic data types to querying databases, and from calling RESTful APIs to testing and securing your site.
Each recipe includes code solutions that you can freely use, along with a discussion of how and why they work. Whether you’re an experienced PHP programmer or coming to PHP from another language, this book is an ideal on-the-job resource.
You’ll find recipes to help you
Basic data strings, numbers, arrays, and dates and times Program building variables, functions, classes, and objects Web cookies, forms, sessions, and authentication Database access using PDO, SQLite, and other extensionsRESTful API clients and servers, including HTTP, XML, and OAuth Key email, regular expressions, and graphics creation Designing robust security and encryption, error handling, debugging and testing, and performance tuning Files, directories, and PHP’s Command Line Interface Libraries and package managers such as Composer and PECL
David Sklar, MD is the author of “La Clinica,” a memoir of his experience as a volunteer in a rural Mexican clinic and “Atlas of Men,” an award-winning novel about a secret research project. He is an emergency physician, professor at Arizona State University and medical researcher who has authored or co-authored more than 200 articles about medical education, emergency health care, and global health. He is former editor-in-chief of Academic Medicine, the leading medical education journal in the US. He lives in Phoenix, Arizona. To learn more about his life and work, visit www.davidpsklar.com.
Zunächst ist dieses Buch eines der vielen PHP Bücher, die auf Biegen und Brechen auf den 5.3 Zug aufspringen möchten. PHP 5.3 hat mit der Einführung von Namespaces und Closures einiges für die "Enterprise" Programmierung getan. Dieses Buch trägt dem aber eigentlich keine Rechnung. Vielmehr ist es eine Sammlung von einfachen Lösungen für alltägliche Probleme, die man ohne irgendein Framework-X mit 100000 Zeilen Code und etwa 100 Bugs mittels PHP bewältigen kann. Zudem betet es keine Paradigmen herunter sondern zeigt, dass man PHP auch einfach und schnell einsetzen kann, ohne gleich eine eierlegenden Wollmilchsau zu programmieren. Mir hat es Spaß gemacht, die Ansätze in diesem Buch als Inspiration für meine eigenen Projekte anzunehmen. Da ich einige der vorgeschlagenen Lösungen während meiner Programmierarbeit selbst auf ähnliche Weise gelöst habe, gibt mir das Buch ein Gefühl mit meiner Einstellung zu PHP als hocheffizienten "Problemlöser", nicht alleine da zu stehen. Im Vergleich zu den theoretischen PHP Büchern, die von MVC sprechen aber immer nur ein Blog oder andere "Kinkerlitzchen" implementieren, bekommt man hier etwas für die Praxis als Webworker. Sollte man gelesen haben.