3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_ENV = [ 'ZASIS_UI_BACKGROUNDCOLOR' => '#FFF1EC', 'ZASIS_UI_INFOPANEL_ENABLE' => '1', 'ZASIS_UI_INFOPANEL_TEXT' => 'DEBUG IS ON', 'ZASIS_UI_INFOPANEL_BACKGROUNDCOLOR' => '#F44', ]; $arr = [ 'ui' => [ 'backgroundColor' => 'ZASIS_UI_BACKGROUNDCOLOR', 'infoPanel' => [ 'enable' => 'ZASIS_UI_INFOPANEL_ENABLE', 'text' => 'ZASIS_UI_INFOPANEL_TEXT', 'fontColor' => 'ZASIS_UI_INFOPANEL_FONTCOLOR', 'backgroundColor' => 'ZASIS_UI_INFOPANEL_BACKGROUNDCOLOR', ] ] ]; function loadEnv(&$data): void { if (is_array($data)) { foreach ($data as $key => &$value) { try { loadEnv($value); } catch (\InvalidArgumentException $e) { unset($data[$key]); } } } elseif (array_key_exists($data, $_ENV)) { $data = $_ENV[$data]; } else { throw new \InvalidArgumentException(); } } loadEnv($arr); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [ui] => Array ( [backgroundColor] => #FFF1EC [infoPanel] => Array ( [backgroundColor] => #F44 ) ) )

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:
119.41 ms | 405 KiB | 5 Q