URL As Comments¶
<?php
http://www.example.com/foo
function foo($a) {
// what does this do?
}
?>
The code below includes a raw URL in the code. PHP understand that code as a goto label, followed by a online comment starting with //. As such, the comment is valid, but cannot be repeated, as it would make a dual goto label, and PHP would raise an error.
See Also¶
URL as comments [Try me]
PHP Features¶
Last updated: 14 July 2026