zoukankan      html  css  js  c++  java
  • 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);
    ?> 
    
  • 相关阅读:
    java操作docker示例(docker-java)
    istio实现对外暴露服务
    istio实现自动sidecar自动注入(k8s1.13.3+istio1.1.1)
    k8s1.13.3安装istio(helm方式)
    wrk http压测工具介绍
    etcd 相关介绍
    openresty 常用API学习
    Lua 相关知识点
    Lua 获取table的长度
    Lua 字符串相关操作
  • 原文地址:https://www.cnblogs.com/djwhome/p/12521695.html
Copyright © 2011-2022 走看看