3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php namespace Migros\Model; /** * Represents the Brand information */ class Brand { /** * ID of the brand * * @var string * @Serializer\Type("string") * @Serializer\XmlAttribute * @Serializer\Groups({"api"}) */ public $id; /** * Name of the brand * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $name; /** * Unique user-friendly ID * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $slug; /** * The title, e.g. suitable for the page title element * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $title; /** * A short, plain text description, e.g. suitable for the page meta element * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $abstract; /** * Keywords, e.g. suitable for the page meta element * * @var array * @Serializer\Type("array<string>") * @Serializer\XmlList(entry="keyword") * @Serializer\Groups({"api"}) */ public $keywords = array(); /** * The caption to the description * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $headline; /** * The long description of the brand (can contain HTML) * * @var string * @Serializer\Type("string") * @Serializer\Groups({"api"}) */ public $description; /** * Image of the brand * * @var Image * @Serializer\Type("Migros\Model\Image") * @Serializer\Groups({"api"}) */ public $image; /** * Whether this brand is owned by Migros (deprecated, use the information in tags instead) * * @var boolean * @Serializer\Type("boolean") * @Serializer\Groups({"api"}) * @deprecated since Sprint 27 */ public $migrosOwned; /** * Importance of the brand * * @var integer * @Serializer\Type("integer") * @Serializer\Groups({"api"}) */ public $importance; /** * Collection of links indexed by string identifier * * @var array[Link] * @Serializer\Type("array<string, Migros\Model\Link>") * @Serializer\XmlMap(entry="link", keyAttribute="id") * @Serializer\Groups({"api"}) */ public $links = array(); /** * Tags for flagging certain brands * * @var array * @Serializer\Type("array<string>") * @Serializer\XmlList(entry="tag") * @Serializer\Groups({"api"}) */ protected $tags = array(); /** * The score of the elastic search result in debug mode * * @var float * @Serializer\Type("float") * @Serializer\XmlAttribute * @Serializer\Groups({"scored-brands"}) */ public $score; /** * The score explanation of the elastic search result in debug mode * * @var array * @Serializer\Type("array") * @Serializer\XmlKeyValuePairs * @Serializer\Groups({"scored-brands"}) */ public $scoreExplanation; } $d = new Brand(); var_dump($d);
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
object(Migros\Model\Brand)#1 (15) { ["id"]=> NULL ["name"]=> NULL ["slug"]=> NULL ["title"]=> NULL ["abstract"]=> NULL ["keywords"]=> array(0) { } ["headline"]=> NULL ["description"]=> NULL ["image"]=> NULL ["migrosOwned"]=> NULL ["importance"]=> NULL ["links"]=> array(0) { } ["tags":protected]=> array(0) { } ["score"]=> NULL ["scoreExplanation"]=> NULL }
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_STRING in /in/jVOm4 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_STRING in /in/jVOm4 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/jVOm4 on line 3
Process exited with code 255.