3v4l.org

run code in 500+ PHP versions simultaneously
<?php class_alias('a', 'c'); use A as B; // duplicate hidden type function foo(array | iterable $b) {} // d8plicate type function foo2(a | b $b) {} // a and c are always considered distinct function foo3(a | c $b) {} // PHP is smarter than this poor usage of DNF function foo4((a & b) | (b & a) $b) {} ?>
Output for 8.5.7
Fatal error: Duplicate type array is redundant in /in/SvDIP on line 7 Stack trace: #0 {main}
Process exited with code 255.

preferences:
46.14 ms | 480 KiB | 3 Q