3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class Money { public function __construct(int $amount, $currency) { $this->amount = $amount; $this->currency = $currency; } public function equals(Money $otherMoney) { return $this->amount === $otherMoney->amount && $this->currency === $otherMoney->currency; } } $moneyOne = new Money(100, 'EUR'); var_dump($moneyOne->equals(new Money(100, 'ISK')));
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Creation of dynamic property Money::$amount is deprecated in /in/qOLbF on line 7 Deprecated: Creation of dynamic property Money::$currency is deprecated in /in/qOLbF on line 8 Deprecated: Creation of dynamic property Money::$amount is deprecated in /in/qOLbF on line 7 Deprecated: Creation of dynamic property Money::$currency is deprecated in /in/qOLbF on line 8 bool(false)

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