3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arraykey = new stdClass; $arraykey->date = "2008-05-20"; $arraykey->page_views = 1; $arraykey->date = "2011-08-03"; $arraykey->page_views = 2; $arraykey->date = "2008-08-20"; $arraykey->page_views = 3; $arraykey->date = "2008-08-27"; $arraykey->page_views = 2; $arraykey->date = "2011-10-11"; $arraykey->page_views = 3; foreach($arr_date as $ad) { $temp = 0; if(strtotime($ad->date) > now()) { $temp = $page_views; } $total = $temp + $temp; } echo $total;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $arr_date in /in/7lTni on line 15 Warning: foreach() argument must be of type array|object, null given in /in/7lTni on line 15 Warning: Undefined variable $total in /in/7lTni on line 24

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