Questions tagged as 'php'

3
answers

Facilitation in projects with PHP

I work with PHP using Sublime Text and would like something similar to what it's like in Eclipse. For example: In Eclipse I can open exactly where the method was declared. In Sublime Text I did not find any similar option, I use the shortcut...
asked by 28.03.2017 / 19:58
1
answer

What is method chaining?

In object-oriented languages, there is a concept known as method chaining or encadeamento de métodos to Portuguese.    What exactly is this?       How would you implement this technique in a PHP application?     
asked by 23.12.2015 / 07:57
3
answers

What is the difference between bindParam and bindValue?

What's the difference between PDOStatement :: bindParam () and PDOStatement :: bindValue ()?     
asked by 17.09.2015 / 06:27
4
answers

strtoupper () with accents

The strtoupper() function of PHP is not transforming the letters with a capital accent, see example: echo strtoupper("virá"); // retorna VIRá Do you have a native function that solves this problem?     
asked by 03.09.2015 / 14:10
4
answers

Integer with 0 on the left is printed as another number

I have this code: $mob_numbers= array(02345674, 12345675, 22345676, 32345677); echo ($mob_numbers[0]); I wanted to print the first element of array but the output of that is:    641980 Why does this happen?     
asked by 14.03.2014 / 13:17
3
answers

Working with lists without using Array () in PHP

I know that in PHP for almost every type of list, we work with Array() , but is this the only way to work with lists in PHP? Is there any other way to work with lists of objects in PHP, similar to the Collections classes ( List ,...
asked by 26.01.2016 / 14:33
3
answers

How to check if a string has only uppercase letters?

How can I check if all characters in a string are uppercase? Preferably, without the use of regular expressions.     
asked by 11.12.2013 / 17:33
8
answers

Is it recommended to use constants for a PHP project's settings?

It is very common to see constants in a configuration file in a PHP project, however I would like to know if this is really the best practice, as I think if I store the password of a database in a config.php it could be used anywhere, that is,...
asked by 18.11.2015 / 17:05
5
answers

Catch all names and put commas to separate them

When I get the names and add to a variable, I can not detach them with commas normally. It must be by comma and dot at the end I can not put each name in line break using It's hard to explain, but here's an example: while ($listintegr...
asked by 27.04.2015 / 16:14
6
answers

How to make a stopwatch continue counting after closing the page?

I need to create a timer that is started through a play , but I wanted a solution, other than just SESSION , to let even if the client closes the window or drops his internet, that is, it is not dependent on cache or front ....
asked by 08.05.2015 / 20:30