7 puan yazan xguru 2020-11-27 | 2 yorum | WhatsApp'ta paylaş
  • İki JIT motoruyla hız iyileştirmesi: Tracing JIT + Function JIT

  • Tip sistemi ve hata işleme iyileştirildi

  • Named arguments

→ htmlspecialchars($string, double_encode: false);

  • Attributes

→ #[Route("/api/posts/{id}", methods: ["GET"])]

  • Constructor property promotion

→ __construct( public float $x = 0.0 ) {}

  • Union Type

→ private int|float $number

  • Match expression

→ match (8.0) { '8.0' => "Oh no!", 8.0 => "This is what I expected", };

  • Nullsafe operator

→ $country = $session?->user?->getAddress()?->country;

  • Daha tutarlı string-sayı karşılaştırmaları

→ 0 == 'foobar' // false (önceden true idi)

  • Ek olarak: WeakMap sınıfı, Stringable arayüzü, str_contains(), str_starts_with(), str_ends_with() fonksiyonları

2 yorum

 
galadbran 2020-11-28

Şu anda empty("0") => true, peki 8'de gerçekten ne olacak?!

 
galadbran 2020-11-28

8'de de aynı kalmış hehe