To String Magic Method in PHP - Become a PHP Master - 23

Published: 08 May 2019
on channel: Atif Naseem
430
8

This magic function does not accept any arguments with it and returns a string value. All the functions that start with a double underscore are especially reserved for Objects.

__toString must always return a string, otherwise the function gives a fatal error. Also, there is no way to throw an exception from within __toString resulting into an error.

#PHPTutorial #PHPForBeginners #AtifNaseem


On this page of the site you can watch the video online To String Magic Method in PHP - Become a PHP Master - 23 with a duration of hours minute second in good quality, which was uploaded by the user Atif Naseem 08 May 2019, share the link with friends and acquaintances, this video has already been watched 430 times on youtube and it was liked by 8 viewers. Enjoy your viewing!