3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getOptionOrElse(array $options, string $key, $else = false) { if (key_exists($key, $options) && $options[$key]['value'] !== '' && $options[$key]['value'] !== null) { return $options[$key]['value']; } return $else; } $abo_options = [ 'gedeelde bundel - belminuten per maand' => ['value' => 200], 'gedeelde bundel - sms per maand' => ['value' => 200], 'gedeelde bundel - mb per maand' => ['value' => 200] ]; $minuten_sms_mb_amount = getOptionOrElse($abo_options,'gedeelde bundel - belminuten per maand', 0); $minuten_sms_mb_amount += getOptionOrElse($abo_options,'gedeelde bundel - sms per maand', 0); $minuten_sms_mb_amount += getOptionOrElse($abo_options,'gedeelde bundel - mb per maand', 0); echo "amount: {$minuten_sms_mb_amount}";
Output for git.master, git.master_jit, rfc.property-hooks
amount: 600

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