3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_list = 'a:5:{i:0;a:3:{s:2:"id";s:3:"191";s:4:"name";s:3:"Ali";s:5:"range";s:5:"today";}i:1;a:3:{s:2:"id";s:3:"190";s:4:"name";s:4:"John";s:5:"range";s:5:"today";}i:2;a:3:{s:2:"id";s:3:"189";s:4:"name";s:5:"peter";s:5:"range";s:12:"in last week";}i:3;a:3:{s:2:"id";s:3:"180";s:4:"name";s:3:"Ali";s:5:"range";s:12:"in last week";}i:4;a:3:{s:2:"id";s:3:"170";s:4:"name";s:4:"Jack";s:5:"range";s:12:"in last week";}}'; $array_list = unserialize($array_list); $new_list = array(); foreach( $array_list as $list ) $new_list[$list['range']][] = $list; ?> <div id="notification_box"> <?php foreach( $new_list as $item_name => $items ): ?> <div class= "cases"> <div class="title"><?php echo $item_name ?></div> <?php if( $items && is_array( $items ) ) { ?> <table> <?php foreach( $items as $item ): ?> <tr> <td><?php echo $item['id'] ?></td> <td><?php echo $item['name'] ?></td> </tr> <?php endforeach; ?> </table> <?php } ?> </div> <?php endforeach; ?> </div>
Output for git.master, git.master_jit, rfc.property-hooks
<div id="notification_box"> <div class= "cases"> <div class="title">today</div> <table> <tr> <td>191</td> <td>Ali</td> </tr> <tr> <td>190</td> <td>John</td> </tr> </table> </div> <div class= "cases"> <div class="title">in last week</div> <table> <tr> <td>189</td> <td>peter</td> </tr> <tr> <td>180</td> <td>Ali</td> </tr> <tr> <td>170</td> <td>Jack</td> </tr> </table> </div> </div>

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:
23.91 ms | 408 KiB | 5 Q