Are PHP label names reserved globally?

I know goto won't work between functions and classes, but are the label names reserved? Can I successfully use the same label name in separate closures?

Answers


$x = function()
{
    goto end;
    end:
    echo "From X\n";
};

$y = function()
{
    goto end;
    end:
    echo "From Y\n";
};

$x();
$y();
/*
Outputs:

From X
From Y
*/

Need Your Help

Insert values in Binary Search Trees

c++ data-structures linked-list binary-tree binary-search-tree

I was trying to write a method which set values in a binary search tree. I have implemented a simple technique of recursion to add nodes in the tree. But when I input the values and ran the code I ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.