How to open svg file in php

How to open a svg file in php and show it on website ? I tried echo but it's not working.

<?php

        $SVGData='<circle cx="25" cy="25" r="20" stroke="green" stroke-width="4" fill="green " />';     
        file_put_contents('images/circle.svg', $SVGData);
        $fo = fopen("images/circle.svg", "r");

    ?>