(PHP 4 >= 4.1.0, PHP 5, PHP 7)
Examples:
Variant example, PHP 4.x style
PHP versions prior to PHP 5 define a number of (undocumented) virtual properties for instances of the VARIANT class; these properties have all been removed in PHP 5 in favour of its more natural syntax; these differences are best highlighted by example:
1 2 3 4 5 | <?php $v = new VARIANT(42); print "The type is " . $v ->type . "<br/>" ; print "The value is " . $v ->value . "<br/>" ; ?> |
Variant example, PHP 5 style
1 2 3 4 5 | <?php $v = new VARIANT(42); print "The type is " . variant_get_type( $v ) . "<br/>" ; print "The value is " . $v . "<br/>" ; ?> |