Skip to content

PHP面试 #122

@mingyun

Description

@mingyun

最近开始面试了,也找到工作了,正好做个总结

#简历

关于简历怎么写,知乎上有对应问题,可以搜索看看,这里推荐几个简历相关的 repo
程序员写简历时,常用的例句范式 https://github.com/resumejob/awesome-resume
简历常用例句 https://github.com/resumejob/awesome-resume
程序员简历模板 https://github.com/geekcompany/ResumeSample
在线简历 http://cv.ftqq.com/#
#面试题
1.实现斐波那契数列

function fib($n) {
    if($n <= 0) return 0;
    if ($n <= 2) return 1;
    return fib($n - 1) + fib($n - 2);
} 
 
function fib2($n) {
if ($n <= 2) return 1;
$arr = [0,1,1];
for ($i = 3; $i <= $n; $i++) {
    $arr[$i] = $arr[$i - 1] + $arr[$i - 2];
}
return $arr[$n];
} 

2.nginx 热启动
nginx -s reload

3.读取1G大文件
使用游标或者yield生成器来获取数据库的数据 https://segmentfault.com/a/1190000012334856
http https 区别 https://www.itcodemonkey.com/article/4195.html
PHP实现 var_dump

redis 持久化
http://www.hoohack.me/2018/04/04/deep-learning-redis-durability
https://juejin.im/entry/5b35ad87f265da597759804b/
权限如何设计
user用户表、role角色表、perm权限表、role-user用户角色关联表、role-perm角色权限关联表
apache nginx 区别
https://juejin.im/entry/5b34b2d7e51d4558ae19f2eb
nginx从入门到实践 https://juejin.im/post/5a2600bdf265da432b4aaaba

谈谈最近微信支付 xxe 漏洞
php 写代码调用simplexml_load_string之前一定要先这么把外部引用实体关掉:
libxml_disable_entity_loader(true);
$data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);

写个定时任务
https://crontab-generator.org/ https://crontab.guru/ https://tool.lu/crontab/ https://atool.vip/crontab

array_merge + 区别 https://segmentfault.com/a/1190000014838713
如何实现多继承
PHP中Trait详解及其应用 https://segmentfault.com/a/1190000008009455

curl上传文件 https://segmentfault.com/a/1190000006220620

$data = array('name'=>'boy', "upload"=>"");
    $ch = curl_init(); 

    $data['upload']=new CURLFile(realpath(getcwd().'/boy.png'));

    curl_setopt($ch, CURLOPT_URL, "http://115.29.247.189/test/testRespond.php");
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); 
    curl_setopt($ch, CURLOPT_POSTFIELDS , $data);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

    $output = curl_exec($ch); 

    echo $output;

    curl_close($ch);      

php nginx 执行流程

PHP & https://segmentfault.com/q/1010000008279730
$arr = [1,2,3];
foreach($arr as &$v) {
//nothing todo.
}
foreach($arr as $v) {
//nothing todo.
}
var_export($arr);
//output:array(0=>1,1=>2,2=>2)
非技术问题
为什么要在上家公司离职?
未来三年的职业规划的怎样的?
你有什么问的?

#资源

PHP面试准备 https://github.com/xianyunyh/PHP-Interview
关于面试/谈Offer/程序员职场生涯等 https://github.com/lietoumai/awesome-offer
少写PHP "烂"代码 https://segmentfault.com/a/1190000015274515
PHP工程师面试题目 https://github.com/hookover/php-engineer-interview-questions
PHPer 面试指南 https://github.com/todayqq/PHPerInterviewGuide
一个16年毕业生所经历的php面试 https://github.com/OMGZui/noteBook/blob/master/level.md
找工作遇到的面试题目 https://cloud.tencent.com/developer/article/1104156
大话编程 https://mp.weixin.qq.com/s/nCx7Jb5WRXGzkpsuth6LAw https://mp.weixin.qq.com/s/13OJ8YAXLj3tqAC0aZ1e_Q
strace帮助你调试PHP代码 https://www.jianshu.com/p/cbc716f8a932?
Resetful API 设计规范 https://godruoyi.com/posts/resetful-api-design-specifications
Java 基础知识、底层原理 面试 https://github.com/crossoverJie/Java-Interview
PHP基础数据结构专题系列目录地址 https://github.com/xx19941215/light-tips
后端架构师技术图谱 https://github.com/xingshaocheng/architect-awesome
记一次面试,分享我整理的答案 https://laravel-china.org/articles/9143/write-an-interview-and-share-my-answers
PHP 面试知识点汇总 https://github.com/eaglewu/php-interview-best-practices-in-china
平时积累 https://github.com/OMGZui/noteBook
PHP 代码简洁之道 https://github.com/ryanmcdermott/clean-code-javascript
PHP PSR 标准规范 https://www.twle.cn/l/yufei/phppsr/php-psr-index.html https://laravel-china.org/docs/psr
PHP 开发知识结构 https://github.com/han8gui/PHPer
PHP多进程系列笔记 https://mp.weixin.qq.com/s/af2my0IC4VIo1WNaCvZAaA
https://juejin.im/post/5a912b3f5188257a5c608729 Redis从入门到实践
浅谈消息队列及常见的消息中间件 https://juejin.im/post/5b41fe36e51d45191252e79e
《程序员练级攻略》推荐必读书籍清单 https://time.geekbang.org/column/article/10793
redis开发设计规范及案例分析 https://mp.weixin.qq.com/s/vS8IMgBIrfGpZYNUwtXrPQ
php 一些碎片基础知识 https://github.com/xx19941215/light-tips
MySQL运维:索引与查询性能优化 https://juejin.im/entry/5b444bf05188251a8d36d034
从输入URL到页面展示到底发生了什么 https://juejin.im/entry/5b44155f6fb9a04f932fdf80
数据结构与算法 https://mp.weixin.qq.com/s/FslsYpofN5vE20TEfJNwrw
PHP面试:说说你理解的二叉树吧 https://segmentfault.com/a/1190000015635928
初中级PHP面试基础汇总 https://segmentfault.com/a/1190000015412706 https://segmentfault.com/a/1190000010250591
php 经典排序算法(解析) https://segmentfault.com/a/1190000011751912
PHP面试之一:PHP基础知识点 https://segmentfault.com/a/1190000011335262
PHPer、Laravel 面试可能会遇到的问题及答案 https://github.com/todayqq/caseInterviewQuestions
PHPer 面试指南-扩展阅读资源整理 https://segmentfault.com/a/1190000012971148
3年PHPer的面试总结 http://coffeephp.com/articles/4?utm_source=laravel-china.org
PHP 无限级分类最佳实践 https://segmentfault.com/a/1190000008265618
数据库面试题(开发者必看) https://segmentfault.com/a/1190000013517914
10个值得深思的PHP面试问题 https://segmentfault.com/a/1190000005032279

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions