3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T1 { private function a1() { echo 1; } protected function a() { echo 2; } } class A{ public static function s(){ use T1; $this->a1(); $this->a(); } } A::s();
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16, 7.0.0 - 7.0.1
Parse error: syntax error, unexpected 'use' (T_USE) in /in/TVAqS on line 13
Process exited with code 255.

preferences:
163.52 ms | 1395 KiB | 25 Q