3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SklepKomputerowy{ private $d; private $m; private $komp; private $mysz; private $k; public function __construct($druk, $mon, $komp, $mysz, $klaw){ $this->d = $druk; $this->m = $mon; $this->komp = $komp; $this->mysz = $mysz; $this->k = $klaw; } protected function Twojadrukarka(){ $drukarki = array( 0 => "HP", 1 => "Canon", 2 => "Creaton" ); $drukarka = $this->drukarki[$this->d]; return $this->drukarka; } public function Pokaz(){ echo Twojadrukarka(); } } $Zestaw1 = new SklepKomputerowy(0, 1, 2, 3, 4); $Zestaw->Pokaz(); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $Zestaw in /in/cYV2J on line 32 Fatal error: Uncaught Error: Call to a member function Pokaz() on null in /in/cYV2J:32 Stack trace: #0 {main} thrown in /in/cYV2J on line 32
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
55.05 ms | 401 KiB | 8 Q