Avatar of rgb192
rgb192Flag for United States of America

asked on 

built in php objects

from a lynda.com tutorial
how could I learn more about this subject matter,
I think it is built in php objects

this is the transcript
00:00	In this chapter, I'm going to explore built-in PHP objects.
00:04	I'll start with the standard class, which is pretty generic,
00:07	then demonstrate how to get objects from the database.
00:10	We'll handle errors in an object-oriented way, then customize them to meet our needs.
00:14	Let's start with the standard class.
00:16	A standard class is a generic class that can be created by typecasting a value
00:20	as an object, like casting the string "hello, world" as an object.
00:24	It won't have any methods, but it will have values.
00:27	In case you were wondering, if you typecast an object to an object, that's kind of
00:31	goofy, and nothing will happen.
00:34	If you typecast that array to an object, the result will be an object with
00:37	properties named for the keys to the array, with values corresponding to the array values.
00:43	Let's clean up the demo, and remove the cloning tests.
00:46	Create a test standard class object out of a nested array.
00:51	Echo <h2> Testing typecasting to an object>.
01:01	$test_object = (object). This is the typecasting. array. hello as the key and
01:10	world as the value. Then nested as an array ( 'key => value').
01:24	Then, debug the test object.
01:29	Save, then refresh your browser.
01:33	The result will be a standard class with properties "hello" and "nested," with nested
01:37	containing an array.
01:39	If I was to typecast any other data type like a string, the value would be
01:43	converted to a standard object, with one property named scalar.
01:47	Return to the demo, and replace the array definition with the number 12345. Save, and refresh.
02:00	The test object now has one property, scalar, with the value 12345.
02:07	Standard class objects are practically used in a number of ways.
02:10	For example, returning a defined data structure with fixed branches without nesting.
02:16	Sometimes, it's used as a shorthand to speed code development, as it takes less
02:20	characters to access a property than it does to specify a key.
02:24	Finally, you can use a standard object when interacting with a method that is
02:28	looking for an object with particular properties, but isn't actually
02:31	checking for the class.
02:33	In the next video, I will show you how to load objects directly from the
02:37	database, then intelligently load addresses from the database into the
02:40	correct class.

Open in new window

PHP

Avatar of undefined
Last Comment
rgb192
ASKER CERTIFIED SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rgb192
rgb192
Flag of United States of America image

ASKER

thanks for object tutorials
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo