3v4l.org

run code in 300+ PHP versions simultaneously
<?php $count = 0; $count_total = 10; $columns = 3; $all_posts = array(1,2,3,4,5,6,7,8,9,10); foreach ($all_posts as $k => $v) { $count++; $is_first_column = false; if ($count == 1 || ($count-1) % $columns == 0) { $is_first_column = true; } echo '<article id="post-' . $k . '" class="post-col ' . ($is_first_column ? 'column_1' : '') . '">'; }
Output for git.master, git.master_jit, rfc.property-hooks
<article id="post-0" class="post-col column_1"><article id="post-1" class="post-col "><article id="post-2" class="post-col "><article id="post-3" class="post-col column_1"><article id="post-4" class="post-col "><article id="post-5" class="post-col "><article id="post-6" class="post-col column_1"><article id="post-7" class="post-col "><article id="post-8" class="post-col "><article id="post-9" class="post-col column_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:
57.11 ms | 401 KiB | 8 Q