Skip to content

Instantly share code, notes, and snippets.

@elleryq
Created April 8, 2014 09:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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