3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait TestTrait { const CONSTANT = 0; }
Output for 8.2.22 - 8.2.29, 8.3.5 - 8.3.25, 8.4.1 - 8.4.12
Output for 8.1.9 - 8.1.33
Fatal error: Traits cannot have constants in /in/Lhdmi on line 5
Process exited with code 255.

preferences:
42.27 ms | 407 KiB | 5 Q