3v4l.org

run code in 300+ PHP versions simultaneously
<?php class bar { public function setup_pins() { for ($i = 0; $i < 4; $i++) { echo "Setting up pin " . $i . "\n"; $this->pin[$i] = new Pin; $this->pin[$i]->setup_unit(4, array()); } } } class Pin { public function setup_unit($pin_no, $units) { $this->do_counter(); echo $this->c; } public function do_counter() { if (! isset($this->c)) { $this->c = 0; echo "Not set\n"; } else { $this->c++; echo "C is " . $this->c . "\n"; } } } $stuff = new bar; $stuff->setup_pins();
Output for git.master, git.master_jit, rfc.property-hooks
Setting up pin 0 Deprecated: Creation of dynamic property bar::$pin is deprecated in /in/E8iRB on line 10 Deprecated: Creation of dynamic property Pin::$c is deprecated in /in/E8iRB on line 28 Not set 0Setting up pin 1 Deprecated: Creation of dynamic property Pin::$c is deprecated in /in/E8iRB on line 28 Not set 0Setting up pin 2 Deprecated: Creation of dynamic property Pin::$c is deprecated in /in/E8iRB on line 28 Not set 0Setting up pin 3 Deprecated: Creation of dynamic property Pin::$c is deprecated in /in/E8iRB on line 28 Not set 0

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:
41.57 ms | 402 KiB | 8 Q