3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rows = [ ['id' => 21, 'text' => 't1', 'Mon' => 1], ['id' => 22, 'text' => 't2', 'Mon' => 0], ['id' => 23, 'text' => 't3', 'Mon' => 1], ]; $rowsResult = []; foreach($rows as $index => $row){ if($row['Mon'] == 1){ $rowsResult [$index] = $row; } } var_dump($rowsResult);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { [0]=> array(3) { ["id"]=> int(21) ["text"]=> string(2) "t1" ["Mon"]=> int(1) } [2]=> array(3) { ["id"]=> int(23) ["text"]=> string(2) "t3" ["Mon"]=> int(1) } }

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