3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = "Chan" $str = ")24.231.23.2 " + $n + ":" // ")24.231.23.2 Chan:" preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} " . $n . "/", $str, $m); str_replace(" " + $n, "", $m[0], $r); $ip = $r[0]; // Should return 24.231.23.2
Output for 5.4.0 - 5.4.29
Parse error: syntax error, unexpected '$str' (T_VARIABLE) in /in/Rdmhg on line 3
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/Rdmhg on line 3
Process exited with code 255.

preferences:
204.33 ms | 1386 KiB | 66 Q