# PHP 8.0 릴리즈

> Clean Markdown view of GeekNews topic #3267. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3267](https://news.hada.io/topic?id=3267)
- GeekNews Markdown: [https://news.hada.io/topic/3267.md](https://news.hada.io/topic/3267.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-11-27T11:12:39+09:00
- Updated: 2020-11-27T11:12:39+09:00
- Original source: [php.net](https://www.php.net/releases/8.0/en.php)
- Points: 7
- Comments: 2

## Topic Body

- 두개의 JIT 엔진으로 속도 개선 : Tracing JIT + Function JIT

- 타입 시스템 과 에러처리 개선

- 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;

- Saner string to number comparisons

ㅤ→ 0 == 'foobar' // false (예전엔 true 였음)

- 추가 : WeakMap 클래스, Stringable 인터페이스, str_contains(), str_starts_with(), str_ends_with() 함수들

## Comments



### Comment 3626

- Author: galadbran
- Created: 2020-11-28T10:06:13+09:00
- Points: 1

지금은 empty(“0”) => true 인데 8에서는 과연?!

### Comment 3627

- Author: galadbran
- Created: 2020-11-28T10:21:39+09:00
- Points: 1
- Parent comment: 3626
- Depth: 1

8에서도 그대로네요 ㅎㅎ
