Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

PHP Features

Last updated: 09 November 2026