Skip to content

Instantly share code, notes, and snippets.

@elleryq
Created April 8, 2014 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elleryq/10103147 to your computer and use it in GitHub Desktop.
Save elleryq/10103147 to your computer and use it in GitHub Desktop.
To reproduce "PHP Fatal error: Cannot create references to/from string offsets nor overloaded objects"
<?php
$widgets = array();
$widgets['a'] = 'hello';
print($widgets['a'][0]); // show 'h'
print("\n");
$o = & $widgets['a'][0]; // Show "Cannot create references to/from string offsets"
//print($o);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment