在C,atoi()中有一个函数,在PHP中实现它;
所以这就是我发现的(its implementation in C)
its implementation in C
int myatoi(const char *string) { int i; i=0; while(*string) { i = (i<<3) + (i<<1) + (*string - '0'); string++; }
php c algorithm atoi
algorithm ×1
atoi ×1
c ×1
php ×1