Object Syntax

The object syntax is a coding style that involves using the object operator ->, and, to a lesser extend, the static operator ::.

Object syntax is often opposed to the array syntax, which relies on arrays and the square brackets [ ]: it uses string index as properties and functions instead of methods.

Object syntax is also opposed to resource: some PHP extensions produce resources, which are usually feed as first argument into dedicated functions. The object syntax hides the resource in an object, and makes use of method calls, with similar names and parameters.

<?php

$object = new Stdclass();
$object->property = 1;
echo $object->property;

?>

Related : Array Syntax, resource