• php函数 极简版


    explode()
    implode()
    substr()
    str_replace()
    str_ireplace()
    strchar()
    strrchar() strstr()
    strpos()
    stripost()
    strlen()
    count()
    array()
    array_combine()
    range()
    compact()
    array_fill()
    array_chunck()
    array_merge()
    array_slice() 取值 返回
    array_splice() 取值 替换
    array_diff() 差集
    array_intersect() 交集
    array_search()
    array_sum()
    array_key_exists()
    in_array()

    key()
    current()
    next()
    prev()
    end()
    reset()

    list($a,$b,$c) = $array; 用数组中的元素为一组变量赋值

    array_shift()
    array_unshift()
    array_push()
    array_pop()
    shuffle() 数组洗牌 打乱
    array_flip() 键值反转
    array_keys()
    arrya_values()
    array_reverse() 反转
    array_count_values()
    array_rand()
    array_unique()
    sort() 顺序排序
    rsort() 逆向排序

    fopen()
    fread()
    fwirte()
    fclose()
    file_exist()
    filesize()
    is_readable()
    is_writeabe()
    is_excuteable()
    filectime()
    filemtime()
    fileatime()

    feof() 是否结束
    fgets() 一行
    file() 将一个文件读入一个数组中,数组中的每一个元素,都是文件的一行
    file_get_contens()
    flock()
    dirname()
    basename()
    pathinfo()
    opendir()
    readdir()
    closedir()
    rmdir()
    unlink()
    copy()
    rename()
    is_uploads_file()
    move_uploads_file()
    time()
    date()
    strtotime()
    date_default_timezone_set()
    microtime() 返回当前unix时间戳和微秒数调用

    array_map() 将回调函数作用到给定数组的单元上 返回一个数组,该数组的每个元素都数组(arr1)里面的每个元素经过回调函数(callback)处理了的。

    <?php
    function cube($n)
    {
        return($n * $n * $n);
    }
    
    $a = array(1, 2, 3, 4, 5);
    $b = array_map("cube", $a);
    print_r($b);
    ?> 
    
  • 相关阅读:
    小事引发的思考
    C++程序设计教程学习(0)-引子
    Cygwin安装
    PATHEXT环境变量简介
    Oracle Real Application Cluster
    SQLNET.AUTHENTICATION_SERVICES参数说明
    用神经网络拟合数据
    用PyTorch自动求导
    用PyTorch做参数估计
    深度学习基础(概念性)
  • 原文地址:https://www.cnblogs.com/djwhome/p/12521695.html
Copyright © 2020-2023  润新知