Questions tagged as 'php'

1
answer

Is it a bad practice to use empty interfaces?

I've heard comments that would be a good idea when a future implementation can occur. I've also heard that it's a bad practice. I know that in PHP, for example, there is an interface called Traversable who has nothing. It serves onl...
asked by 24.07.2015 / 17:31
2
answers

What is Lazy Loading and Eager Loading?

What is Lazy Loading and Eager Loading ? I saw these terms in a documentation but I do not quite understand it, so mine is to know what these terms mean and I would like to if possible restrict the scope of the answer / question to PHP...
asked by 20.07.2015 / 14:59
3
answers

How to change the title of each PHP page dynamically?

I do not understand almost anything about PHP. Once a friend sent me a code that allowed me to separate my page into several parts and then get those parts back in case I change anything in the scripts and style sheets so I do not need to go pag...
asked by 16.03.2014 / 20:25
4
answers

How to convert number in float to full number in PHP?

Is there any native function, or other practical way, to take a number in float and convert it to the extended number? Example: //input: 2.000,00 //output: dois mil     
asked by 20.11.2015 / 16:41
2
answers

What does "sanitize" data mean?

I'm making a form, and I'm performing the validation part ... I see a lot of the term sanitize or sanitizar , what does this mean? I've even seen some functions in php that take this term in its parameters.     
asked by 23.02.2017 / 21:32
1
answer

How to generate a pdf file containing the digital certificate information? [closed]

I have a PHP system that generates a pdf, and I need to use the client's Digital Certificate to sign this document. I've been reading documentation, and I've seen that the FPDF that I'm using does not yet support this method, since TCPDF give...
asked by 13.05.2015 / 03:29
7
answers

What are the implications of not declaring variables in PHP?

In php I can do this without declaring / setting variables: echo($foo); //resolve: vazio, sem nada $foo++; echo($foo); // resolve: 1 Using var_dump() it gives, respectively NULL and 1 . If I use settype($foo, "int...
asked by 22.12.2013 / 14:44
3
answers

What does the code below (written by a cracker) do?

Today one of the company sites where I work was hacked, as well as several others that are archaic development methods and full of security holes ... The person who invaded left a modified index in the following code in another file and I was...
asked by 10.03.2014 / 13:52
4
answers

How does the current function work?

It's been a while since I've always used the current() function in PHP to get the first element of the array (which in fact is not its functionality since it returns the current pointer in array is) and I've been noticing something tha...
asked by 10.07.2014 / 13:57
2
answers

What's the difference between Switch, Case and If, Else?

I would like to know the difference between switch .. case and if .. else . What offers better "performance"?     
asked by 13.04.2015 / 20:33