Mastering PHP 7
eBook - ePub

Mastering PHP 7

Branko Ajzele

Buch teilen
  1. 536 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Mastering PHP 7

Branko Ajzele

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Effective, readable, and robust codes in PHPAbout This Book• Leverage the newest tools available in PHP 7 to build scalable applications• Embrace serverless architecture and the reactive programming paradigm, which are the latest additions to the PHP ecosystem• Explore dependency injection and implement design patterns to write elegant codeWho This Book Is ForThis book is for intermediate level developers who want to become a master of PHP. Basic knowledge of PHP is required across areas such as basic syntax, types, variables, constants, expressions, operators, control structures, and functions.What You Will Learn• Grasp the current state of PHP language and the PHP standards• Effectively implement logging and error handling during development• Build services through SOAP and REST and Apache Trift• Get to know the benefits of serverless architecture• Understand the basic principles of reactive programming to write asynchronous code• Practically implement several important design patterns• Write efficient code by executing dependency injection• See the working of all magic methods• Handle the command-line area tools and processes• Control the development process with proper debugging and profilingIn DetailPHP is a server-side scripting language that is widely used for web development. With this book, you will get a deep understanding of the advanced programming concepts in PHP and how to apply it practicallyThe book starts by unveiling the new features of PHP 7 and walks you through several important standards set by PHP Framework Interop Group (PHP-FIG). You'll see, in detail, the working of all magic methods, and the importance of effective PHP OOP concepts, which will enable you to write effective PHP code. You will find out how to implement design patterns and resolve dependencies to make your code base more elegant and readable. You will also build web services alongside microservices architecture, interact with databases, and work around third-party packages to enrich applications. This book delves into the details of PHP performance optimization. You will learn about serverless architecture and the reactive programming paradigm that found its way in the PHP ecosystem. The book also explores the best ways of testing your code, debugging, tracing, profiling, and deploying your PHP application.By the end of the book, you will be able to create readable, reliable, and robust applications in PHP to meet modern day requirements in the software industry.Style and approachThis is a comprehensive, step-by-step practical guide to developing scalable applications using PHP 7.1

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Mastering PHP 7 als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Mastering PHP 7 von Branko Ajzele im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Informatica & Programmazione in PHP. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2017
ISBN
9781785889943

Working with Databases

The PHP language has a pretty good support for several different databases. MySQL has been embraced by PHP developers as the go-to database ever since the early days of the PHP language. While the initial emphasis was mostly on relational database management systems (RDBMS), other types of databases proved to be equally (or more) important for modern applications. The document and data key-value databases have been growing in popularity ever since.
Nowadays, it is not uncommon to see a PHP application making use of MySQL, Mongo, Redis, and possibly a few more databases or data stores all at once.
The NoSQL ("non SQL", "non relational" or "not only SQL") nature of Mongo allows building applications that generate massive volumes of new and possibly rapidly changing data types. Relieved from the strictness of SQL (Structured Query Language), working with structured, semi-structured, unstructured, and polymorphic data becomes a whole new experience with the Mongo database. The in-memory data structure stores such as Redis strive on speed, which makes them great to cache and message broker systems.
In this chapter, we will take a closer look at MySQL, Mongo, and Redis through the following sections:
  • Working with MySQL
    • Installing MySQL
    • Setting up sample data
    • Querying via the mysqli driver extension
    • Querying via the PHP Data Objects driver extension
  • Working with MongoDB
    • Installing MongoDB
    • Setting up sample data
    • Querying via the MongoDB driver extension
  • Working with Redis
    • Installing Redis
    • Setting up sample data
    • Querying via the phpredis driver extension
Throughout this chapter, we provide quick installation instructions for each of the three database servers. These instructions are given on a relatively basic level, without any post-installation configuration or tuning that is usually done on production-type machines. The general idea here was to merely get the developer machine up and running with each of the database servers.

Working with MySQL

MySQL is an open source RDBMS that has been around for over 20 years now. Originally developed and owned by the Swedish company MySQL AB, it is now owned by Oracle Corporation. The current stable version of MySQL is 5.7.
Some of the key strengths of MySQL can be outlined as follows:
  • Cross-platform, runs on server
  • Can be used for desktop and web applications
  • Fast, reliable, and easy to use
  • Good for small and large applications
  • Uses standard SQL
  • Supports query caching
  • Supports Unicode
  • ACID compliance when using InnoDB
  • Transactions wh...

Inhaltsverzeichnis