Solved

What is "(string)" in php statement?

Posted on 2015-02-19
3
46 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP installation issues 11 60
PHP and google maps 13 44
php simple error message 4 23
Checkout Page Input Field not aligned 1 22
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

770 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