Skip to content

Instantly share code, notes, and snippets.

@juzna
Created February 5, 2012 18:58
Show Gist options
  • Save juzna/1747229 to your computer and use it in GitHub Desktop.
Save juzna/1747229 to your computer and use it in GitHub Desktop.
PHP native object support
object(Pepa)#2 (1) {
["myObj"]=>
object(stdClass)#1 (2) {
["ahoj"]=>
int(1)
["novak"]=>
string(4) "pepa"
}
}
<?php
class Pepa {
public $myObj = { 'ahoj': 1, 'novak': 'pepa' };
}
var_dump(new Pepa());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment