写一个函数传参实现两个整数相加的函数

原创 2019-05-29 10:21:52 335
摘要:<?php header('content-type:text/html;charset=utf-8'); echo 'hello world'.'<br>'; function numBer($int1,$int2){     $int =&nb
<?php

header('content-type:text/html;charset=utf-8');
echo 'hello world'.'<br>';


function numBer($int1,$int2){
    $int = $int1 + $int2;
    return '相加的整数值为:'.$int;
}

echo numBer(13,5);


批改老师:查无此人批改时间:2019-05-29 13:15:36
老师总结:完成的不错。自己写的叫方法,php系统的叫函数。继续加油。

发布手记

热门词条

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号