Questions tagged as 'php'

1
answer

How to update my MySQL code for MySQLi?

I have codes that use mysql and need to update to mysqli . I need to make two changes, these being the .php pages that insert the data into the database table and data and also the pages that display the data. How to pr...
asked by 22.01.2015 / 15:24
7
answers

What is the difference of these parameters (array) in these methods?

I see this a lot in methods class Exemplo { public function exemplo1(array $parameters = array()) { } public function exemplo2(array $parameters) { } public function exemplo3($parameters = array()) { } }...
asked by 30.01.2015 / 14:55
3
answers

How to check if you have connected to the database?

How do I check if my PHP + PDO code successfully connected to the MySQL database? With the code it works: <?php /* Connect to a MySQL database using driver invocation */ $dsn = 'mysql:host=localhost;port=3306;dbname=bancoservico'; $us...
asked by 24.09.2016 / 20:14
4
answers

What is the practical use of bitwise operators in PHP?

The bitwise bit operators used to manipulate specific bits are somewhat unusual (not to say rare) use in a PHP application. If we talk about escovação de bits in compiled languages, such as C/C++ , it is easier to understand...
asked by 01.03.2016 / 21:56
3
answers

PHP + Delphi (Pascal), issue real-time warnings

I would like to create a small, simple system, encoded in the Pascal language (IDE delphi), to receive notifications (such as a warning that some event occurred), when the warning sounds. I understand little of Delphi, it was one of the langu...
asked by 19.10.2015 / 00:16
2
answers

What is the unicode signature (BOM)

I noticed that sometimes dreamweaver puts assinatura unicode (BOM) on some php pages, I have to remove most of the time so that there is no space on the page to display and I'm not sure what%% of% would you like to explain?     
asked by 20.03.2014 / 16:51
1
answer

Are there differences between //, / * * / and #?

Considering how important it is to comment on a code , that question came to me. I noticed that there are several ways to comment lines / parts of the code : // /* */ # Example: // comentando uma linha /...
asked by 08.08.2018 / 21:54
2
answers

What is the Declare keyword used in PHP?

After all, what is the declare keyword used in PHP? I've seen explanations out there, including in the PHP Manual , but not yet I found it very clear. Can it be useful for development? Example: declare (ticks=1) { // todo...
asked by 26.02.2015 / 15:38
5
answers

What is the fastest is_null ($ y) or $ y == null?

What is the fastest is_null($y) or $y == null ?     
asked by 06.07.2015 / 14:57
6
answers

Is it bad practice to only use static methods in a class?

I was studying more deeply the OOP, learning more advanced concepts like Polymorphism, Override, Classes and final methods, abstraction, namespace and etc ... I've learned about static methods, where it can not be accessed by the object (...
asked by 26.02.2016 / 20:07