3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); abstract class Object {} interface iObjectID { public function getId(); public function setId(int $id = NULL); } trait tObjectID { /** * @TF: {column => id, type => int} * integer $id */ protected $id; public function getId() { return $this->id; } public function setId(int $id = NULL) { $this->id = $id; } } trait tObjectName { /** * @TF: {column => name, type => string} * string $name */ protected $name; public function getName(): string { return $this->name; } public function setName(string $name = NULL) { $this->name = $name; } } trait tObjectCoolurl { /** * @TF: {column => coolurl, type => string} * string $coolurl */ protected $coolurl; public function getCoolurl(): string { return $this->coolurl; } public function setCoolurl(string $coolurl = NULL) { $this->coolurl = $coolurl; } } class Gallery extends Object implements iObjectID { use tObjectID; use tObjectName; use tObjectCoolurl; } //Instantiate the reflection object $reflector = new ReflectionClass('Gallery'); // Now get all the properties from class A in to $properties array $properties = $reflector->getProperties(); var_dump($properties);

preferences:
61.06 ms | 402 KiB | 5 Q