Java One
From the first println to a REST API in production
PHP One
PHP Fundamentals
Types, arrays, functions, strings, hand-written SQL, PDO, Composer, object-oriented programming, exceptions, strict typing, enums, closures, files, dates and errors. The first volume of PHP One — the foundation on which volume 2's Laravel is built.
R$ 9,99
R$ 29,99
Promoção
Atenção: o idioma desta edição é inglês.
English Edition
Menos teoria vazia.
Mais código que funciona.
Nada de exemplo solto com foo e bar.
Todo trecho pertence ao mesmo projeto, que cresce capítulo a capítulo —
e os erros aparecem como aparecem na sua tela, para serem lidos linha por linha.
<?phpdeclare(strict_types=1);enum CopyStatus: string{ case Good = 'good'; case OnLoan = 'on_loan'; case Repair = 'repair'; case Missing = 'missing';}
php hello.phpHello, Casa Amarelaphp loan.phpFatal error: Undefined constant CopyStatus::OnLoa
Um sistema só, do primeiro arquivo ao deploy
README.md
Fifteen years online, half a million loans and a file called functions2_NEW_final.php. You rebuild the Casa Amarela Library system, from the first echo to an organized Composer project.
Modern PHP from zero, before any framework.
- Modern PHP: strict types, enums, readonly and match
- Hand-written SQL before any ORM
- Composer, namespaces and autoloading without the mystery
- Domain exceptions and strict typing, with PHPStan
29 capítulos em 5 partes
Abra uma parte para ver os capítulos — e a frase que abre cada um.
parte 01 PHP from scratchThe language before any framework. Run, fail, read the message, fix it — and find out early the two or three places where PHP quietly decides something you never asked for. 11 cap.
-
01
The PHP you've heard aboutA language made to count visits to a résumé, which today serves a huge part of the web — with types, enums and a new release every November.
-
02
What we are going to buildEleven boxes on a slide, sixty-eight thousand reais on a deadline, and nobody in the room able to say what the system does today.
-
03
The first programTwo lines of PHP, three different installations on the same machine and a blank page that is no error at all.
-
04
Variables and typesThirty-one outstanding on the screen, twenty-seven on paper. The four extras owed exactly zero reais.
-
05
When PHP converts on its ownMr. Juvenal typed the wrong password and logged in as the head librarian. The culprit is two characters long.
-
06
OperatorsThe kiosk told Mrs. Marlene she was minus three days late, with a fine of negative R$ 2,40.
-
07
ConditionalsEleven lending rules, forty seconds of talking, zero lines written down in thirty-one years.
-
08
ArraysPHP's most used structure is also its most misused — and one line of it once took down the app of twelve hundred people.
-
09
LoopsIt works with twelve. The problem is that nobody tests with eight thousand.
-
10
FunctionsA rule that lives in ten places changes in nine. The tenth is always the one that prints the receipt.
-
11
StringsHalf the bugs in a Brazilian system live in the distance between a character and a byte.
parte 02 Data needs somewhere to liveDatabases in the middle of the language, not at the end of the book. Files, concurrency, hand-written SQL, JOIN, indexes and PDO — so that Eloquent, in volume 2, has something to be compared with. 4 cap.
-
12
From file to databaseTwo clerks, one file, one loan. There should have been two.
-
13
SQL: the five sentences that get you through the dayAn UPDATE without a WHERE on a Friday returned eight thousand books nobody had returned.
-
14
Two tables talkingFour million rows read to return three results. Since 2011.
-
15
PDO: PHP talking to the databaseThe intern typed five characters into the search box and the screen returned the entire catalog.
parte 03 From script to projectThe moment one file becomes thirty. Composer, autoload, namespaces and the first classes — the border between writing PHP and maintaining a PHP project. 4 cap.
-
16
From include to ComposerTwo functions with the same name in two files. The page works or dies depending on which one gets in first.
-
17
Classes and objectsThe report showed a copy of no book at all. The data was right in the database — it was the array that had lost the key.
-
18
Namespaces and autoloadThe import needed the old book and the new book in the same program. The second one was named BookNew2.
-
19
EncapsulationThe report said three copies were on loan twice. Six different places wrote to that column.
parte 04 The PHP that Laravel demandsInterfaces, exceptions, strict typing and enums. No feature is here because it is new: each one is here because the framework will ask for it in volume 2. 4 cap.
-
20
Inheritance, interfaces and traitsThe whiteboard had three boxes when Vera arrived. It had ten when she left, and she didn't draw any of them.
-
21
ExceptionsThe nightly import never raised an error. It lost two hundred and fourteen rows a night, silently, for three months.
-
22
Strict typingThe tool ran for eighteen seconds and came back with forty-one additions of a date to text. None of them had raised an error in fifteen years.
-
23
Enums, dates and value objectsVera stayed until eleven closing the inventory. Seven readers woke up owing eighty cents.
parte 05 Before the webWhat sits between the language and the framework: references, closures, large files, dates with time zones, errors that warn you, and a project with a place for everything. The last part of volume 1 is the first door into volume 2. 6 cap.
-
24
Scope and referencesThe day's returns list had Dom Casmurro twice. Iracema, which had come back at ten, was not on it.
-
25
Anonymous functions and closuresThe report worked until someone added a namespace to the file. After that, PHP could no longer find a function three lines above.
-
26
Working with filesThe donations spreadsheet had two hundred thousand rows. The script that read it all at once stopped on line three, having read none of them.
-
27
Dates and timesThe Sunday bug was four years old. The fix was nine lines long. The fix's test failed after nine at night.
-
28
Errors and debuggingThe nightly import imported nothing and finished successfully. PHP had warned three times, to nobody.
-
29
How to organize a PHP projectOn Friday, Márcia announced that the web part started on Monday. Dedé asked for the weekend to tidy the house before the visit.
PHP One — Volume 2
Speeding Up with Laravel — From the first HTTP request to a Laravel API in production.
Outros livros da série
Java One
From the first println to a REST API in production
PHP One — Volume 2
Speeding Up with Laravel
O que leitores dizem sobre PHP One — Volume 1
Carregando avaliações deste livro…
Ver todas as avaliações deste livro →Este livro também entra em um combo
O combo reúne livros já publicados e sai num único pagamento.
Combo
Combo PHP
PHP One em inglês, volumes 1 e 2, vendidos na plataforma num único pagamento.
- O combo
- R$ 16,99
- Separados
- R$ 19,98
PHP One
Modern PHP from zero, before any framework. O projeto começa a rodar no primeiro capítulo — e não para mais.
Atenção: o idioma desta edição é inglês.