[ create a new paste ] login | about

Link: http://codepad.org/SvJ0FqV8    [ raw code | output | fork ]

PHP, pasted on Apr 22:
1
2
3
4
5
6
7
8
<?php
$x = Array("42" => "wat");
var_dump($x);

$x = new stdclass;
$x->{"42"} = "wat";
$x = (array)$x;
var_dump($x);


Output:
1
2
3
4
5
6
7
8
array(1) {
  [42]=>
  string(3) "wat"
}
array(1) {
  ["42"]=>
  string(3) "wat"
}


Create a new paste based on this one


Comments: