3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Fundtion take array as arguments * print out the preformatted array. * * Prince Adeyemi * */ $data = array( 'first_name' => "John", 'last_name' => "Doe", 'address' => '123 Main St.', 'city' => 'Las Vegas', 'state' => 'NV', 'country' => 'USA', 'orderid' => 1234, 'item_desc' => 'Test order', 'item_price' => 29.99, 'shipping' => 2.99 ); process_order( $data ); function process_order( $data ) { if( count($data) > 0 ) { /** do something with array like order submission, registration etc. */ //display dynamic message to client echo "Processing order # " . $data['orderid'] . " for " . $data['first_name'] . "\n"; print_r( $data ); } else { print "No data received"; } }
Output for git.master, git.master_jit, rfc.property-hooks
Processing order # 1234 for John Array ( [first_name] => John [last_name] => Doe [address] => 123 Main St. [city] => Las Vegas [state] => NV [country] => USA [orderid] => 1234 [item_desc] => Test order [item_price] => 29.99 [shipping] => 2.99 )

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