3v4l.org

run code in 300+ PHP versions simultaneously
<?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.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
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.1.6, 5.2.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.3.11, 4.4.0 - 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.

preferences:
329.16 ms | 401 KiB | 461 Q