3v4l.org

run code in 500+ PHP versions simultaneously
<?php $product = ["product_type" => "DVD", "size" => 20, "dimentions" => "300x200", "weight" => 10]; $lookup = [ "DVD" => ["field" => "size", "append" => "MB"], "Furniture" => ["field" => "dimentions", "append" => ""], "Book" => ["field" => "weight", "append" => ""], ]; $LookupItem = $lookup[$product["product_type"]]; echo $product[$LookupItem["field"]].$LookupItem["append"];
Output for rfc.property-hooks, git.master_jit, git.master
20MB

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:
34.04 ms | 1250 KiB | 4 Q