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 = new CurrentOrder; 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/KKLDr on line 12 Warning: Undefined property: CurrentOrder::$orderID in /in/KKLDr on line 12 NULL

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:
43.87 ms | 401 KiB | 8 Q