3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Ref; trait T { public $traitProperty; public function traitMethod() {} } interface I { const I = 'I'; } class A implements I { use T { T::traitMethod as tMethod; } const A = 'A'; public function __construct() {} public function a() {}; } class B extends A { const B = 'B'; public $public = 'public'; protected static $publicStatic; } $r = new \ReflectionClass('Ref\B'); //$r->getProperty('publicStatic')->setAccessible(true); var_dump($r->hasMethod('tMethod')); var_dump($r->hasMethod('traitMethod')); var_dump($r->hasMethod('a'));
Output for 5.4.0 - 5.4.19
Parse error: syntax error, unexpected ';', expecting function (T_FUNCTION) in /in/kukhe on line 27
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/kukhe on line 5
Process exited with code 255.