3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $host = 'http://www.google.de'; echo substr($host, strpos($host, '.', -1));
based on doKvU
Output for 7.1.0 - 7.2.0
http://www.google.de
Output for 5.2.5 - 7.0.20
Warning: strpos(): Offset not contained in string in /in/1fZZT on line 5 http://www.google.de
Output for 4.3.2 - 5.2.4
Warning: strpos(): Offset not contained in string. in /in/1fZZT on line 5 http://www.google.de
Output for 4.3.0 - 4.3.1
Warning: strpos() [http://www.php.net/function.strpos]: Offset not contained in string. in /in/1fZZT on line 5 http://www.google.de