This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can use console.log() in combination with placeholders: | |
var greet = "Hello", who = "World"; console.log("%s, %s!", greet, who); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Examples for URL: https://example.com/subFolder/yourfile.php?var=blabla#12345 | |
//built-in function | |
$x = parse_url($url); | |
$x['scheme'] 🡺 https | |
$x['host'] 🡺 example.com (or with WWW) | |
$x['path'] 🡺 /subFolder/yourfile.php | |
$x['query'] 🡺 var=blabla | |
$x['fragment'] 🡺 12345 // hashtag outputed only in case, when hashtag-containing string was manually passed to function, otherwise PHP is unable to recognise hashtags in $_SERVER |