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($arraykey 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: Attempt to read property "date" on string in /in/cGgHO on line 18 Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /in/cGgHO on line 18 Fatal error: Uncaught Error: Call to undefined function now() in /in/cGgHO:18 Stack trace: #0 {main} thrown in /in/cGgHO on line 18
Process exited with code 255.

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