Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dotherightthing/7d73222dc01bc74e65a7b155cc04a61a to your computer and use it in GitHub Desktop.
Save dotherightthing/7d73222dc01bc74e65a7b155cc04a61a to your computer and use it in GitHub Desktop.
[Extracting array values] Square brackets vs arrow notation in PHP. #php

Extracting array values

Created: 2017.07.09

$var->foo is an object reference. $var[foo] is an array reference. While this sort of thing could be used interchangeably in some languages like javascript, in PHP an array and an object are two entirely different things - PHP - extracting array values ( square brackets vs arrow notation )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment