3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = json_encode(array('sleep' => 123)); $b = json_encode(array('sleep' => 987)); $logs = array(array('date' => '2014-01-01', 'data' => $a), array('date' => '2015-01-01', 'data' => $b)); $result = array_reduce($logs, function ($cur, $x) { var_dump($x); //$cur[$x] = $x; return $cur; }, array()); var_dump($result);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["date"]=> string(10) "2014-01-01" ["data"]=> string(13) "{"sleep":123}" } array(2) { ["date"]=> string(10) "2015-01-01" ["data"]=> string(13) "{"sleep":987}" } array(0) { }

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