stdClass
is just a generic ’empty’ class that’s used when casting other types to objects. Despite what the other two answers say, stdClass
is not the base class for objects in PHP. This can be demonstrated fairly easily:
class Foo{}
$foo = new Foo();
echo ($foo instanceof stdClass)?'Y':'N';
// outputs 'N'
I don’t believe there’s a concept of a base object in PHP
Related Contents:
- PHP: Count a stdClass object
- How to convert an array into an object using stdClass() [duplicate]
- Convert/cast an stdClass object to another class
- When should I use stdClass and when should I use an array in php oo code?
- Object of class stdClass could not be converted to string
- PHP – recursive Array to Object?
- How to set attributes for stdClass object at the time object creation
- How to access a property of an object (stdClass Object) member/element of an array? [duplicate]
- PHP shell_exec() vs exec()
- What’s the difference between require and require-dev? [duplicate]
- Fastest hash for non-cryptographic uses?
- How do I see the extensions loaded by PHP?
- Handle Guzzle exception and get HTTP body
- MySQL integer field is returned as string in PHP
- What is the difference between fastcgi and fpm?
- Laravel – check if Ajax request
- Get only specific attributes with from Laravel Collection
- Grabbing the href attribute of an A element
- How to determine the memory footprint (size) of a variable?
- php: determine where function was called from
- How to set the default value of an attribute on a Laravel model [duplicate]
- Using $this inside a static function fails
- Hash tables VS associative arrays
- How to add Postgres support to PHP installed by Homebrew?
- How to upgrade PHP 5.4 to PHP 5.6 on Debian GNU/Linux 7 (wheezy)
- php random x digit number
- What is the JS equivalent to the PHP function number_format?
- What is the best way to upload and store pictures on the site?
- Autoloader for functions
- Base64 Encoding Image
- Doctrine Entities and business logic in a Symfony application
- PHP script to render a single transparent pixel (PNG or GIF)
- Can I include code into a PHP class?
- Cannot start session without errors in phpMyAdmin
- Using comparison operators in a PHP ‘switch’ statement
- Convert latin1 characters on a UTF8 table into UTF8
- Remove blacklist keys from array in PHP
- Send JSON POST request with PHP
- How Can I Remove “public/index.php” in the Laravel Url generated? [duplicate]
- mod_php vs cgi vs fast-cgi
- Doctrine 2.1 – datetime column default value
- Find out how PHP is running on server (CGI OR fastCGI OR mod_php)
- The server encountered an internal error or misconfiguration and was unable to complete your request [closed]
- Why can’t you call abstract functions from abstract classes in PHP?
- How do I run all my PHPUnit tests?
- eclipse xdebug session never completes
- mysql timediff to hours
- symfony2: how to access service from template
- Laravel $request->file() returns null
- Is there an easy way to convert a number to a word in PHP?