3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ProtectedTestTrait { protected $test; } class ProtectedTestBase { use ProtectedTestTrait; } class ProtectedTestChild { public function execute() { return property_exists($this, 'test'); } } $protectedChild = new ProtectedTestChild(); echo $protectedChild->execute() ? 'ja' : 'nee';

preferences:
45.51 ms | 402 KiB | 5 Q