3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( "contact_name" => "contact1", "email" => "", "id" => 1 ), array( "contact_name" => "contact2", "email" => null, "id" => 2 ), array( "contact_name" => "contact3", "email" => "user@domain.com", "id" => 3 ), ); $filtered = array_filter($array, function($contact) { if(!empty($contact['email']) && $contact['email'] != '') { return $contact; } }); echo '<pre><code>', print_r($filtered), '</code></pre>';
Output for git.master, git.master_jit, rfc.property-hooks
<pre><code>Array ( [2] => Array ( [contact_name] => contact3 [email] => user@domain.com [id] => 3 ) ) 1</code></pre>

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