Blog - Latest News

Use of Referencing in php

There are advantages of using references, for example you don’t have to return anything from the function, nor do you have to look to define them as globally accessible. EXAMPLE: function lowercase(&$string){ $string = strtolower($string); } $name = ‘SAJU’; lowercase($name); echo $name; // returns saju

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *