#phpquiz

Turbo Learn PHPTurboLearnPHP
2026-02-10

Max of Arrays

Which array is bigger? Watch max([1,2,3], [4,5]) and learn how PHP compares arrays! The result is unexpected!

youtube.com/watch?v=3jXTBoFf0i8

Turbo Learn PHPTurboLearnPHP
2026-02-09

PHP Array Key Type Casting Mystery

Can you guess this? PHP array keys get cast automatically. Watch what happens with [1] vs ['1'] vs [true]. The result is wild!

youtube.com/watch?v=oBXSVMxoHBI

Turbo Learn PHPTurboLearnPHP
2026-02-04

PHP Generator Yield Magic

Stop scrolling! PHP generators use memory efficiently. See function numbers() with yield. One keyword, infinite possibilities!

.5

youtube.com/watch?v=Tt0pvyS72VM

Turbo Learn PHPTurboLearnPHP
2026-01-29

PHP strcmp vs == Comparison

Stop scrolling! PHP strcmp() and == compare differently. See '10' vs '10.0'. The difference will shock you!

youtube.com/watch?v=JNLjMPqfBZQ

Johan Vervloetvohanj@phpc.social
2026-01-28

@gmazzap Although it is documented, the behavior of array_merge with integer keys is unexpected, since most people answered the question incorrect.

If you want to keep the keys when merging arrays, it is safer to use the + operator:

```php
$b = [4 => 1] + $a;
```

3v4l.org/42i4k#vnull

#phpquiz #php

Johan Vervloetvohanj@phpc.social
2026-01-27

#phpquiz #php

```php
$a = [];
$b = array_merge([4 => 1], $a);
```
Which one is true now:

Turbo Learn PHPTurboLearnPHP
2026-01-25

PHP Magic Constants Behavior

Watch this! PHP magic constants change based on context. See __LINE__ and __FUNCTION__ in different scopes. Perfect for debugging!

youtube.com/watch?v=OZb0gcBc6bk

Turbo Learn PHPTurboLearnPHP
2026-01-23

PHP Null Coalescing Operator Secret

Stop scrolling! PHP ?? operator has a hidden trick. Watch null ?? 'default' ?? 'fallback'. The result will surprise you!

youtube.com/watch?v=AVWEeNrXnjs

Turbo Learn PHPTurboLearnPHP
2026-01-20

Modulo with Negatives

Modulo with negative numbers in PHP! See -7 % 3 vs 7 % -3 - which negative wins? The answer surprises everyone!

youtube.com/watch?v=dGydndHfPKI

Turbo Learn PHPTurboLearnPHP
2026-01-15

PHP Callable Type Hint Secret

Can you solve this? PHP callable accepts functions, methods, and closures. See what callable $func does. Game changer!

youtube.com/watch?v=DXEDNL6mAxE

Turbo Learn PHPTurboLearnPHP
2026-01-13

Null Coalesce Chain

The null coalesce operator is genius! See $a ?? $b ?? $c in action. Which value wins? Test your skills!

youtube.com/watch?v=iXH4EDcJZeg

Turbo Learn PHPTurboLearnPHP
2026-01-10

array_combine Mismatch

What if array keys and values have different lengths? Watch array_combine fail! Can you predict the result?

youtube.com/watch?v=dc6Qs8OaWOQ

Turbo Learn PHPTurboLearnPHP
2026-01-09

PHP Static Variable Trap

Watch this! PHP static variables persist across function calls. See what happens when you call the function twice. Game changer!

youtube.com/watch?v=eWWcAmfs1yI

Turbo Learn PHPTurboLearnPHP
2026-01-02

PHP Array Union vs Merge Trap

Stop scrolling! PHP + and array_merge() work completely differently. See the difference with duplicate keys. The result is SHOCKING!

youtube.com/watch?v=fEYx8AHOK8M

Turbo Learn PHPTurboLearnPHP
2025-12-26

PHP Array Access on Strings

Can you solve this? PHP lets you access strings like arrays. See what 'Hello'[1] returns. The behavior is WILD!

youtube.com/watch?v=V18SD51i2wY

Turbo Learn PHPTurboLearnPHP
2025-12-25

PHP Anonymous Class Trick

Wait for the reveal! PHP anonymous classes create objects on the fly. See new class {}. This will change your code style!

youtube.com/watch?v=2TNZPgNrP2I

Turbo Learn PHPTurboLearnPHP
2025-12-25

Switch Type Juggling

PHP switch statements use loose comparison! See how '1' matches case 1. This trap catches even experienced developers!

youtube.com/watch?v=Au8lBWRj0tY

Turbo Learn PHPTurboLearnPHP
2025-12-23

PHP Closure Variable Binding

Wait for the reveal! PHP closures capture variables differently than you think. See what happens with use(). This changes everything!

youtube.com/watch?v=XoHcmIUxVws

Turbo Learn PHPTurboLearnPHP
2025-12-23

Array + vs array_merge

Array + vs array_merge in PHP! Watch $a + $b vs array_merge behavior. They're completely different!

youtube.com/watch?v=Jd-hgzyoCLA

Turbo Learn PHPTurboLearnPHP
2025-12-22

Ternary Associativity

PHP ternary operator is left-associative! This trap catches everyone. Can you predict the output?

youtube.com/watch?v=qN3jEXSPiZc

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst