3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = strpos($text, "\nsomething in the middle"); echo 'This works: '; var_dump($result); echo "\n<br>\n"; $buggy_result = strpos($text, "something in the middle\n"); echo 'This does not: '; var_dump($buggy_result);

preferences:
39.54 ms | 402 KiB | 5 Q