3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $n = "Chan"; $str = ")24.231.23.2 " + $n + ":"; preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} " . $n . "/", $str, $m); echo $m; //str_replace(" " + $n, "", $m[0], $r); //$ip = $r[0]; // Should return 24.231.23.2 //echo $ip;
Output for 7.1.0
Warning: A non-numeric value encountered in /in/g7FKR on line 3 Warning: A non-numeric value encountered in /in/g7FKR on line 3 Warning: A non-numeric value encountered in /in/g7FKR on line 3 Notice: Array to string conversion in /in/g7FKR on line 5 Array
Output for 5.4.0 - 7.0.14
Notice: Array to string conversion in /in/g7FKR on line 5 Array
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.3.29
Array
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/g7FKR on line 8
Process exited with code 255.