Solved

What is "(string)" in php statement?

Posted on 2015-02-19
3
48 Views
Last Modified: 2015-02-20
Can someone please explain / refer me to the php documentation regarding the meaning/use of "(string)" in the following:

		// Do not serialize the $hooks because they might contain non-serializeable objects
		$key = (string) $dsn_or_conn . serialize($config) . $log_level;

Open in new window

0
Comment
Question by:SAbboushi
3 Comments
 
LVL 40

Accepted Solution

by:
Kyle Abrahams earned 250 total points
ID: 40620161
It's a cast (conversion) to make the $dsn_or_conn . serialize($config) . $log_level a string.
0
 
LVL 23

Assisted Solution

by:Michael74
Michael74 earned 250 total points
ID: 40620174
For more detail have a look at Type Casting in this link
http://php.net/manual/en/language.types.type-juggling.php
0
 

Author Closing Comment

by:SAbboushi
ID: 40621530
Thanks guys!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question