3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { protected $p; protected mixed $p2; } class x2 extends x { protected mixed $p; // type of x2:$p must not be defined (as in class x) protected $p2; // Type of $x2:$p2 must be mixed }
Output for 8.2.0 - 8.2.28, 8.3.0 - 8.3.22, 8.4.1 - 8.4.8
Fatal error: Type of x2::$p must not be defined (as in class x) in /in/biaDm on line 8
Process exited with code 255.

preferences:
45.89 ms | 724 KiB | 3 Q