answersLogoWhite

0

What are ticks used for in PHP?

Updated: 8/18/2019
User Avatar

PaulJanaway

Lvl 1
13y ago

Best Answer

If by "ticks" you actually mean "back ticks", ie. the ` character, then they are the same as using the shell_exec() function. For example:

$foo = `ls`;

Would assign the output of the ls command to the variable $foo.

If on the other hand you're referring to the single quote, or apostrophe, then it is used as a string delimiter for strict text with no special characters. For example, the code:

$foo = 'bar';

echo 'test #1 says $foo\n';

echo "test #2 says $foo\n";

would output the following:

test #1 says $foo\ntest $2 says bar

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are ticks used for in PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you use ticks in PHP?

Backticks in PHP are simply shorthand for calling shell_exec on their contents, as in most Unix shells. See the related link.


Which language is used more for websites PHP or ASP.net?

Php


What is the use of a question mark in php?

It is used to tell the sever to use the PHP parser. To begin php you must use <?php, and to end it, it is ?>.


How does PHP function in applications?

in php used for one typ website


What file extension is used to save a php file after code has been written into it?

The file extension for PHP is .php


Is PHP a drug?

PHP is a programming language. You may be thinking of PCP, or a-PHP (a-Pyrrolidinobutiophenone).


What is Zen Studio PHP?

Zend Studio is IDE used for PHP development.


Where does PHP used?

PHP is a Server side scripting language used for web development.The programs in php will be run on the server and only the output is sent to the internet browser.


What is new in PHP?

PHP is a recursive acronym for "PHP: Hypertext Preprocessor" created by The PHP Group. PHP is a widely used server-side scripting language and the general purpose of PHP is to create dynamic Web Pages. For more information, visit the PHP website.


What is the main competitor of PHP?

PHP generally competes with ASP.NET, although PHP is installed and used on a much greater number of servers.


Does Google Chrome have PHP module enabled?

Yes, Chrome has PHP module enabled. It can be used for testing and developing PHP websites.


What is php plus plus?

PHP++ is an object-oriented version of the PHP programming language. ++ is used in programming to increment a variable by one so it means an improved version of PHP.