3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait A { function __construct($c) { echo 'dddd'; $this->c = $c; } function getReturnDescription() { /*2*/ } } trait B { function __construct($c) { echo 'AAAA'; $this->c = $c; } function getReturnDescription() { /*2*/ } } class ezcReflectionMethod { use A, B; /* ... */ } $a = new ezcReflectionMethod('ccc'); var_dump($a);
based on s1o8M
Output for 7.0.0 - 7.3.0rc3
Fatal error: Trait method __construct has not been applied, because there are collisions with other trait methods on ezcReflectionMethod in /in/VcvMg on line 17
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Method '__construct' declared in multiple traits in /in/VcvMg:17 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Trait method __construct has not been applied, because there are collisions with other trait methods on ezcReflectionMethod in /in/VcvMg on line 20
Process exited with code 255.