3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_GET['server']) && !empty($_GET['server'])) { $ip = $_GET['server']; } $keys = array( '63.43.45.34' => 'something', '216.144.248.194' => 'something', '216.144.249.2' => 'something', '216.144.248.130' => 'something', '216.144.249.66' => 'something', '216.144.248.66' => 'something', '63.143.39.130' => 'something', '74.63.230.2' => 'something', '216.144.249.130' => 'something', '63.143.39.194' => 'something', '69.162.107.66' => 'something', '63.143.38.66' => 'something', '216.144.244.210' => 'something', '216.144.253.194' => 'something', '208.115.193.130' => 'something' ); var_dump(array_key_exists('63.43.45.34', $keys)); $ip = "63.43.45.34"; if (array_key_exists($ip, $keys)) { echo $keys['$ip']; } else { echo "OH NOES"; }
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) Warning: Undefined array key "$ip" in /in/PqSrj on line 32

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