3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class MeineKlasse { private $info; public function setInfo(Information $info_in) { $this->info = $info_in; } public function getNews() { echo $this->info->getInformation(); } } class Information { public function getInformation() { return "hallo"; } } $info = new Information(); $meine_klasse = new MeineKlasse(); $meine_klasse->setInfo($info); $meine_klasse->getNews();
based on X52W8
Output for 5.6.0 - 7.3.0rc4
hallo