[Question] Web Development
#14

Quote:
Originally Posted by Kaperstone
Посмотреть сообщение
That you don't have to declare the variable in PHP.

It is created when you first use that variable.
True, but it's not that safe and clean to program that way in PHP sometimes, since you can make a lot of mistakes with this way.

Like for example the code bellow, if $value doesn't exists, you will get a PHP warning/error (depends on server settings), since you didn't declared $text. And i see a lot of people making this mistakes.

PHP код:
if (isset($value)) {
    
$text 'Value: ' $value;
}
echo 
$text
Reply


Messages In This Thread
[Question] Web Development - by R4nd4ll - 05.12.2017, 19:35
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 20:02
Re: [Question] Web Development - by Garr - 05.12.2017, 20:36
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 20:41
Re: [Question] Web Development - by Garr - 05.12.2017, 20:44
Re: [Question] Web Development - by whadez - 05.12.2017, 21:12
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 21:18
Re: [Question] Web Development - by AndreiWow - 05.12.2017, 22:17
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 22:29
Re: [Question] Web Development - by BlackBank - 05.12.2017, 22:38
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 22:45
Re: [Question] Web Development - by BlackBank - 05.12.2017, 22:52
Re: [Question] Web Development - by Kaperstone - 05.12.2017, 23:01
Re: [Question] Web Development - by BlackBank - 06.12.2017, 00:17

Forum Jump:


Users browsing this thread: 1 Guest(s)