3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php trait HasStatic { private static $x; public static function setX($x) { self::$x = $x; } public function useX() { return self::$x; } } HasStatic::setX(123); class UsesStatic { use HasStatic; } var_dump((new UsesStatic())->useX());
based on 4pXor
Output for 5.5.0 - 7.2.6
int(123)