3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isset_or(&$check, $alternate = NULL) { return (isset($check)) ? $check : $alternate; } $orig = ['alpha' => 1]; $tested = $orig; echo 'isset_or($tested["beta"]): ', isset_or($tested['beta'], 'nope'); var_export([ '$orig' => $orig, '$tested' => $tested, 'array_key_exists("beta")' => [ '$orig' => array_key_exists('beta', $orig), '$tested' => array_key_exists('beta', $tested), ], ]);
Output for git.master, git.master_jit
isset_or($tested["beta"]): nopearray ( '$orig' => array ( 'alpha' => 1, ), '$tested' => array ( 'alpha' => 1, 'beta' => NULL, ), 'array_key_exists("beta")' => array ( '$orig' => false, '$tested' => true, ), )

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:
11.85 ms | 459 KiB | 5 Q