[李景山php] 坑爹的php list 函数实现

来源:互联网 发布:js点击事件的window 编辑:程序博客网 时间:2024/06/05 20:24
list($one, $two, $three) = array('2' => '张三', '李四', '王五');echo '$one----' . $one . '<br />';echo '$two----' . $two . '<br />';echo '$three----' . $three . '<br />';list($one, $two, $three) = array('a' => '张三', '李四', '王五');echo '$one----' . $one . '<br />';echo '$two----' . $two . '<br />';echo '$three----' . $three . '<br />';

其中的原因是因为在内核实现中2会变成2的整型。

0 0
原创粉丝点击