We have upgraded our system to latest version of MyBB. We are very sorry for the downtime ! Read More.
Advertise Here | Remove Ads

case sensitive PHP variables
  • 0 Vote(s) - 0 Average


PHP case sensitive PHP variables
1
PHP variables are not case sensitive because functions have no issue like this. Preference of PHP variables are is usually lower case, but we should always use the case that is in the manual, especially the class name which is always considered as case sensitive

Example I am using FFU name




PHP Code:
<?php
class ForumForU {
  public $x 'foo';
}

$a = new ForumForU();
$b = new forumforu();
$c = new fORUMfORu();
var_dump($a$b$c);
?>
This post was last modified: 10-28-2017, 10:42 PM by Yugocean. Edited 2 times in total.



2
You are right but your code have mistake ! Your code should be like below

PHP Code:
<?php
class ForumForU {
 
 public $x 'foo';
}

$a = new ForumForU();
$b = new forumforu();
$c = new fORUMfORu();
var_dump($a$b$c);
?>
You have missed ?> . I think you should modify the code and also use the php code tag then it will look nice Thumbs Up
This post was last modified: 10-27-2017, 10:07 PM by Shompa. Edited 1 time in total.

Reply


3
(10-27-2017, 10:06 PM)Shompa Wrote: You are right but your code have mistake ! Your code should be like below

PHP Code:
<?php
class ForumForU {
 
 public $x 'foo';
}

$a = new ForumForU();
$b = new forumforu();
$c = new fORUMfORu();
var_dump($a$b$c);
?>
You have missed ?> . I think you should modify the code and also use the php code tag then it will look nice Thumbs Up
Thanks for timely informing, I missed typing it, now edited and corrected it. Thumbs Up

Reply





Forum Jump:


Users browsing this thread:
1 Guest(s)

Advertise Here | Remove Ads