3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'counters' => [ 'success' => 1, 'failed' => 3 ], 'aa' => [1,2,3], 'column_errors' => false ]; $update = array( ); class Job { private $data; public function __construct(array $data) { $this->data = $data; } public function getData() { return $this->data; } public function updateDataWith(array $update) { $result = array_replace_recursive($this->data, $update); if (is_null($result)) { throw new \RuntimeException; } $this->data = $result; } } $job = new Job($a); $job->updateDataWith($update); var_dump($job->getData());
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { ["counters"]=> array(2) { ["success"]=> int(1) ["failed"]=> int(3) } ["aa"]=> array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) } ["column_errors"]=> bool(false) }

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.26 ms | 401 KiB | 8 Q