Hatena::Groupnequal

nequal::unfair

2008-03-18

ちょっときになった

21:26 | ちょっときになった - nequal::unfair を含むブックマーク はてなブックマーク - ちょっときになった - nequal::unfair

<?php
echo 'array', PHP_EOL;
$array = array(1, 2, '3', '4', array('5', 6));
var_dump($array);

echo PHP_EOL, PHP_EOL;
echo 'int key hash', PHP_EOL;
$array = array(0 => 1, 1 => 2, 6 => '3', 5 => array(4, 5));
var_dump($array);

echo PHP_EOL, PHP_EOL;
echo 'array key hash',PHP_EOL;
$key1 = array(1);
$key2 = array('test');
$key3 = array(array('unk' => 'windows'));
$array = array($key1 => 'key1', $key2 => 'key2', $key3 => 'key3');
var_dump($array);

echo PHP_EOL, PHP_EOL;
echo 'object key hash',PHP_EOL;
$key1 = new stdClass();
$key2 = new stdClass();
$key2->id = 'value';
$key3 = array(new stdClass());
$array = array($key1 => 'key1', $key2 => 'key2', $key3 => 'key3');
var_dump($array);

array

array(5) {

[0]=>

int(1)

[1]=>

int(2)

[2]=>

string(1) "3"

[3]=>

string(1) "4"

[4]=>

array(2) {

[0]=>

string(1) "5"

[1]=>

int(6)

}

}


int key hash

array(4) {

[0]=>

int(1)

[1]=>

int(2)

[6]=>

string(1) "3"

[5]=>

array(2) {

[0]=>

int(4)

[1]=>

int(5)

}

}


array key hash

Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 16

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0


Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 16

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0


Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 16

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0

array(0) {

}


object key hash

Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 25

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0


Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 25

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0


Warning: Illegal offset type in /Users/riaf/tmp/hash.php on line 25

Call Stack:

0.0005 59928 1. {main}() /Users/riaf/tmp/hash.php:0

array(0) {

}

思ったより面白くなかった。

ApriliansahApriliansah2012/03/26 21:59Artilces like this really grease the shafts of knowledge.

ahboqdpfahboqdpf2012/03/27 07:26KH6vXf <a href="http://egcroakoqlrs.com/">egcroakoqlrs</a>

pvtlyuedjcpvtlyuedjc2012/03/28 08:23P6vhxR , [url=http://wbouikcacwok.com/]wbouikcacwok[/url], [link=http://tjbghzoqpivj.com/]tjbghzoqpivj[/link], http://rmsyruqnvpgg.com/

FloraFlora2013/07/06 14:51Whoever wrote this, you know how to make a good atricle.

RemyaRemya2013/07/06 23:47Big help, big help. And <a href="http://hhuucrvz.com">suitvlaepre</a> news of course.

RemyaRemya2013/07/06 23:47Big help, big help. And <a href="http://hhuucrvz.com">suitvlaepre</a> news of course.

RemyaRemya2013/07/06 23:47Big help, big help. And <a href="http://hhuucrvz.com">suitvlaepre</a> news of course.

AimanAiman2013/07/10 05:47Gosh, I wish I would have had that <a href="http://gnhpvbs.com">intamrofion</a> earlier!

AimanAiman2013/07/10 05:47Gosh, I wish I would have had that <a href="http://gnhpvbs.com">intamrofion</a> earlier!

AimanAiman2013/07/10 05:47Gosh, I wish I would have had that <a href="http://gnhpvbs.com">intamrofion</a> earlier!