3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "date_2018_08" => 81, "date_2018_09" => 70, "date_2018_10" => 70, "date_2018_11" => 95, "date_2018_12" => 75, "date_2019_01" => 91, "date_2019_02" => 78, "date_2019_03" => 95, "date_2019_04" => 68 ]; $year = 2019; $filtered = array_filter( $array, function ($key) use ($year) { $parts = explode("_", $key); return $parts[1] >= $year; }, ARRAY_FILTER_USE_KEY ); print_r($filtered);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [date_2019_01] => 91 [date_2019_02] => 78 [date_2019_03] => 95 [date_2019_04] => 68 )

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