Browse Source

fragments/stdclass.php: stdClass isn't a universal base

master
Brennen Bearnes 2 years ago
parent
commit
292c6b11e7
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      home/fragments/stdclass.php

+ 12
- 0
home/fragments/stdclass.php View File

@ -0,0 +1,12 @@
<?php
class foo {
}
$bar = new foo();
if ($bar instanceof stdClass) {
print "stdClass is a base class class for objects.";
} else {
print "stdClass is not a base class class for objects.";
}

Loading…
Cancel
Save