Hyvor Developer
  Home   Download   Copy
Code
<?php

function hello() {
	$txt = 'Hello World'; // local scope
 	echo $txt; // $txt can be used here
} 
hello();

// $txt cannot be used outside
Result