3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stocks = [ "stock0" => 1, "stockdate0" => '', "stock1" => 3, "stockdate1" => 'apple', "stock4DON'TMATCHTHIS!!!" => 4, "stock2" => 2, "stockdate2" => '', "stock33" => 333, "stockdate33" => '' ]; $find = 'stock'; var_export( array_filter($stocks, fn($k) => rtrim($k, '0..9') === $find, ARRAY_FILTER_USE_KEY) );
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'stock0' => 1, 'stock1' => 3, 'stock2' => 2, 'stock33' => 333, )

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