3v4l.org

run code in 300+ PHP versions simultaneously
<?php $shops = [ "Shop1" => [ "price" => 5, "stock" => "in stock", "ean" => "5707400342642", "shopName" => "Shop2", ], "Shop2" => [ "price" => 99, "stock" => "in stock", "ean" => "51010101010", "shopName" => "Shop2.dk", ], "Shop3" => [ "price" => 50000000, "stock" => "out of stock", "ean" => "5707406556565655", "shopName" => "Shop3", ] ]; function checkStock($stockManagement) { return ($stockManagement["stock"] == "in stock") ? "På lager" : "Ikke på lager"; } foreach ($shops as $shop => $stockManagement) { echo $shop . ' = ' . CheckStock($stockManagement) . '<br>'; }
Output for git.master, git.master_jit, rfc.property-hooks
Shop1 = På lager<br>Shop2 = På lager<br>Shop3 = Ikke på lager<br>

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:
136.85 ms | 405 KiB | 5 Q