3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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)); if (array_key_exists($ip, $keys) === TRUE) { echo $keys['$ip']; } else { die(hsomethingr('HTTP/1.0 403 Forbidden')); }
Output for 7.0.0 - 7.1.0
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Uncaught Error: Call to undefined function hsomethingr() in /in/OBVXZ:32 Stack trace: #0 {main} thrown in /in/OBVXZ on line 32
Process exited with code 255.
Output for hhvm-3.12.0 - 3.13.2
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Uncaught Error: Call to undefined function hsomethingr() in /in/OBVXZ:32 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.0.4 - 5.6.28, hhvm-3.10.0
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Call to undefined function hsomethingr() in /in/OBVXZ on line 32
Process exited with code 255.
Output for 5.0.0 - 5.0.3
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Call to undefined function hsomethingr() in /in/OBVXZ on line 32
Process exited with code 255.
Output for 4.4.5 - 4.4.9
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Call to undefined function: hsomethingr() in /in/OBVXZ on line 32
Process exited with code 255.
Output for 4.3.2 - 4.4.4
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Call to undefined function: hsomethingr() in /in/OBVXZ on line 32
Process exited with code 255.
Output for 4.3.0 - 4.3.1
bool(true) Notice: Undefined variable: ip in /in/OBVXZ on line 28 Fatal error: Call to undefined function: hsomethingr() in /in/OBVXZ on line 32