3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CurrentOrder { static $orderID = 0; public static function get() { $order = new CurrentOrder; self::$orderID = 'hot dogs'; $order->orderID = 'pizza'; return $order; } public function getOrderID() { return $this->orderID; } } $order = CurrentOrder::get(); var_dump($order->getOrderID());
Output for git.master, git.master_jit, rfc.property-hooks
Notice: Accessing static property CurrentOrder::$orderID as non static in /in/UsGDI on line 8 Deprecated: Creation of dynamic property CurrentOrder::$orderID is deprecated in /in/UsGDI on line 8 Notice: Accessing static property CurrentOrder::$orderID as non static in /in/UsGDI on line 12 string(5) "pizza"

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