[ create a new paste ] login | about

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

PHP, pasted on May 25:
1
2
3
4
5
6
7
8
9
10
<?php
$class = new stdClass;
$class->{75} = 'foobar';

$array = (array) $class;

var_dump($array);
var_dump(array_keys($array));

var_dump($array['75']);


Output:
1
2
3
4
5
6
7
8
9
array(1) {
  ["75"]=>
  string(6) "foobar"
}
array(1) {
  [0]=>
  string(2) "75"
}
NULL


Create a new paste based on this one


Comments: