3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait PropertiesTrait { public $same = true; } class PropertiesExample { use PropertiesTrait; public $same = 2; }
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
Fatal error: PropertiesExample and PropertiesTrait define the same property ($same) in the composition of PropertiesExample. However, the definition differs and is considered incompatible. Class was composed in /in/NOeff on line 8
Process exited with code 255.
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.25
Output for 5.6.38
Strict Standards: PropertiesExample and PropertiesTrait define the same property ($same) in the composition of PropertiesExample. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed in /in/NOeff on line 12

preferences:
161.09 ms | 409 KiB | 5 Q