StreamCode Studio Guidelines and Rules for Syntax | StreamCode Studio
Tutorials

Guidelines and Rules for Syntax

Comments in php Whitespace Inside Its Tags Variable Naming Semicolon Terminates Lines Case Sensitive php String Concatenation Escaping Quote Marks

Guidelines and Rules for Syntax
29 November 2025 1 min read 13 views 0 comments
Comments in php

PHP
<?php
# Single line comment
// Single line comment
/*
Multiline
Comment
*/
?>


Whitespace Inside Its Tags

PHP
<?php
$name="James"; // Good and minified
$name = "James"; // Good but not as slim byte-wise, easier on the eyes
?>


Variable Naming

PHP
<?php
$var1 = "value"; // GOOD
$user_1 = "value"; // GOOD
$1var = "value"; // Throws Error
$|*% = "value"; // Throws Error
?>


Semicolon Terminates Lines

PHP
<?php
$person_1 = "Amy"; // GOOD
$person_1 = "Amy" // BAD
$person_1 = "Amy"
; // It will work but not the best way
?>


Case Sensitive php

PHP
<?php
$var = "car";
$Var = "faster";
echo "The ".$var." goes ".$Var." when you put your foot down.";
// The "car goes faster when you put your foot down.
?>


String Concatenation

PHP
<?php
$car_1 = "car";
$car_2 = "fuel";
echo "The ".$car_1." stops when you run out of ".$car_2;
echo 'The '.$car_2.' will help the  '.$car_2." work again.';
?>


Escaping Quote Marks

PHP
<?php
$str1 = "I watched \"Fallout Season 1\" and it was great";
$str2 = 'I watched \'Fallout Season 1\' and it was brilliant.';
$str3 = "I watched 'Wednesday S1' and it was fantastic.";
$str4 = 'I watched "Wednesday S2" and it was awesome.';
echo $str1; // I watched "Fallout Season 1" and it was great.
echo $str2; // I watched 'Fallout Season 1' and it was brilliant.
echo $str3; // I watched 'Wednesday S1' and it was fantastic.
echo $str4; // I watched "Wednesday S2" and it was awesome.
?>

Article discussion

Share your thoughts about this article.

0

No comments yet. Be the first to join the discussion.

We've sent a download link to your email {}
Please check your inbox (and spam folder just in case).
The link will be valid for 24 hours.


Bell Online / MixStream


BellOnline offers fast, reliable UK hosting with strong security and excellent uptime - perfect for modern radio and web projects.

MixStream provides broadcast-grade streaming with crystal-clear audio and rock-solid stability, ideal for both hobby and professional stations.


Goto BellOnline Now!

Close