3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); <<deprecated>> class Catalogue { <<cacheable>> <<linksTo(Item::class)>> <<type('Item[]')>> public array $items = []; <<returns('Item[]')>> public function getItems(): array { return $this->items; } }
Output for 8.0.0 - 8.0.28, 8.1.0 - 8.1.17, 8.2.0 - 8.2.7
Parse error: syntax error, unexpected token "<<", expecting end of file in /in/i7aRc on line 5
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Parse error: syntax error, unexpected '<<' (T_SL), expecting end of file in /in/i7aRc on line 5
Process exited with code 255.

preferences:
194.84 ms | 1400 KiB | 160 Q