确实PHP使用什么样的算法? [英] What sort algorithm does PHP use?

查看:164
本文介绍了确实PHP使用什么样的算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从内部来说,它的算法(S)不使用PHP来实现各种排序功能,它提供?这似乎是usort变种可能会使用不同的算法比内置的排序,但我想知道。

Internally speaking, which algorithm(s) does PHP use to implement the various sort functions it offers? It seems like the usort variants might use a different algorithm than the built in sorts, but I wanted to know.

我会在哪里,即使找到这些信息?

Where would I even find this information?

谢谢!

推荐答案

您可以找到通过查看PHP手册中的信息。 http://php.net/sort 说PHP使用的的快速排序。如果做不到这一点,你总是可以通过C本身的PHP源$ C ​​$跋涉。

You could find the information by looking at the php manual. http://php.net/sort says PHP uses an implementation of Quicksort. Failing that, you could always trudge through the PHP source code itself.

这篇关于确实PHP使用什么样的算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆