<?php$string = 'The quick brown fox jumps over the lazy fox';echo preg_replace('/fox$/', 'dog', $string);
Standard input is empty
The quick brown fox jumps over the lazy dog
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!