3v4l.org

run code in 300+ PHP versions simultaneously
<ul> <?php $values = array(); $values[] = array('example'=>'example1','date'=>'2016-12-25'); $values[] = array('example'=>'example2','date'=>'2016-12-26'); $values[] = array('example'=>'example3','date'=>'2016-12-28'); $values[] = array('example'=>'example4','date'=>'2016-12-30'); $previous = null; foreach($values as $example){ echo $previous; echo "<li>".$example['example']." - ".$example['date']; if ($previous !== null) { $diff = strtotime($example['date'])-strtotime($previous); echo " - ".($diff/(60*60*24)); } $previous = $example['date']; echo "</li>\n"; } ?> </ul>
Output for git.master, git.master_jit, rfc.property-hooks
<ul> <li>example1 - 2016-12-25</li> 2016-12-25<li>example2 - 2016-12-26 - 1</li> 2016-12-26<li>example3 - 2016-12-28 - 2</li> 2016-12-28<li>example4 - 2016-12-30 - 2</li> </ul>

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