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)); if (array_key_exists($ip, $keys) === TRUE) { echo $keys['$ip']; } else { die(hsomethingr('HTTP/1.0 403 Forbidden')); }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
bool(true) Warning: 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 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
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 7.3.32 - 7.3.33
bool(true) 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 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28
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.3.11, 4.4.0 - 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

preferences:
290.21 ms | 402 KiB | 402 Q