Re: ewby on programming need some tips and tricks

Well I thought that I don't know english very well (and I don't), but I think 
you should also try to read better. I said that the effort is bigger, not the 
program.

Here is a PHP code that prints a warning for the not defined variable:

<?php
error_reporting(E_NOTICE);
$i = 5;
print $I;
?>

The printed error is:
PHP Notice:  Undefined variable:  I in D:\php\z.php on line 4 

But PHP is not very reliable because error_reporting is global and you might 
have problems if you will use components made by others that don't respect this 
rule.

PHP doesn't have a kind of "use strict" like perl does.

Octavian

----- Original Message ----- 
From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Monday, December 08, 2008 11:00 PM
Subject: Re: ewby on programming need some tips and tricks


> >Maybe because you haven't defined well the PHP variables? in what sense?
> and you've still lost me with the program being bigger. The source will be a 
> few bytes larger per variable, but it's hardly going to add tons of overhead 
> to the program, unless you define thousands and thousands of variables.
> 
> 
> Thanks,
> Tyler Littlefield
> email: tyler@xxxxxxxxxxxxx
> web: tysdomain-com
> Visit for quality software and web design.
> skype: st8amnd2005
> 
> ----- Original Message ----- 
> From: "Octavian Rasnita" <orasnita@xxxxxxxxx>
> To: <programmingblind@xxxxxxxxxxxxx>
> Sent: Monday, December 08, 2008 1:49 PM
> Subject: Re: ewby on programming need some tips and tricks
> 
> 
>> From: "Tyler Littlefield" <tyler@xxxxxxxxxxxxx>
>>> you totally lost me. if you use $i in php, then use $I later, it's not 
>>> going to stop you. it'll just create the variable or return 0/""
>>
>> Maybe because you haven't defined well the PHP variables?
>> Or you'll better use a better dynamic language like perl and if you'll 
>> say:
>> use strict;
>> at the beginning of the program, it will catch all the bad defined 
>> variables.
>> (Or use python :-)
>>
>>> and what do you mean by defining the variables making the program bigger?
>>
>> I said "But this just make the effort of making the program bigger".
>> Or more correctly:
>> "But the effort of making this program this way is bigger".
>>
>> Octavian
>>
>> __________
>> View the list's information and change your settings at 
>> http://www.freelists.org/list/programmingblind
>> 
> 
> __________
> View the list's information and change your settings at 
> http://www.freelists.org/list/programmingblind
>
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind

Other related posts: