Solved

What is "(string)" in php statement?

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now