3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Courier { public $name; public $home_country; public function __construct($name, $home_country) { $this->name = $name; $this->home_country = $home_country; return true; } public function __toString() { return $this->name . '(' . $this->home_country . ')'; } } $myCourier = new Courier('abc', 'USA'); var_dump($myCourier); echo serialize($myCourier);

preferences:
53.55 ms | 402 KiB | 5 Q