Questions tagged as 'php'

2
answers

have how to put masks in php dynamically?

I would like to put masks in different fields, all via php, for example: cnpj - "##. ###. ### / #### - ##" cpf - "###. ###. ### - ##" cep - "##### - ###" phone - "(##) #### - ####" date - "## / ## / ####" I do not want to use j...
asked by 17.07.2014 / 13:35
3
answers

Voice recognition in php

This question is really curious, I'm not touching anything like that, but in the future who knows. I would like to know if there is any kind of system or if it is possible to create a system that can do voice recognition (either for login, o...
asked by 22.01.2016 / 13:47
1
answer

Why should we use functions that start with mb_?

Sometimes, problems arise in PHP in relation to some string functions, because of the string's qualification. An example is strlen . $a = strlen('str'); $b = strlen('stré'); var_dump($a, $b); // Imprime 3 e 5 See in IDEONE...
asked by 05.08.2015 / 17:06
2
answers

What exactly is hypertext?

I searched and did not find an answer about this: Is CSS considered hypertext? I have this doubt because PHP, which is hypertext preprocessor, can also preprocess CSS and even JS.     
asked by 11.10.2015 / 04:11
3
answers

Is there a performance difference between "echo" of content and content in HTML?

Does using PHP echo to display any content on the screen differs in performance from using that same direct content in HTML? For example, if I use a PHP file: <?php echo "<p>Seja bem-vindo ao Stack Overflow!</p>";...
asked by 29.01.2016 / 18:15
1
answer

How does PHP-FPM work?

Well, I have a question regarding the PHP-FPM concept. From what I understand through the documentation, is it a PHP module that manages requests to the server to avoid high loads, or am I wrong? How can it benefit in performance?     
asked by 25.05.2017 / 16:32
2
answers

Do I need to use a semicolon at the end of a "unique expression" in PHP?

Example scenario: Let's say I have a page that is generated by includes, and even has a loop: <? require_once 'classes/classe1.class.php'; ?> <html> <head> <? include_once 'html/head.php'; ?> </head> <...
asked by 28.08.2018 / 14:40
2
answers

Is it really necessary to use mutator and accessor methods (setter and getter) in PHP? And the performance?

I have come to realize that most other libraries use the setters and getters methods (hereafter referred to as mutator and accessor in>), to change the ownership of some class. For example: class User { protected $name; public...
asked by 29.01.2016 / 19:36
3
answers

When to use Setters and Getters?

I'm studying OOP and in the encapsulation part I have a question about when to use getters and setters , besides being able to validate the parameter passed, what is the utility of using ? I could just "get" the given by __construct...
asked by 12.12.2014 / 07:50
2
answers

What are the advantages of using associative arrays?

I have come across the definition of associative arrays which are vectors with indices consisting of strings , example: $site['nome'] = "Stack Overflow"; What are the advantages of using this kind of vectors? Since you can not use them i...
asked by 18.12.2015 / 16:04