Table of Contents
PHP面试题之小杂鱼,php面试题
Home php教程 php手册 PHP面试题之小杂鱼,php面试题

PHP面试题之小杂鱼,php面试题

Jun 13, 2016 am 08:53 AM
Interview questions

PHP面试题之小杂鱼,php面试题

这里的题目都是比较老的,但是做笔试题时经常碰到,因为这些题目比较凌乱,考的知识点不好分类,就放一块了

<span>/*</span><span>*
* 题目:最少代码实现求3个数的最大值
* 三目运算符实现
</span><span>*/</span>
<span>function</span> getMax(<span>$a</span>,<span>$b</span>,<span>$c</span><span>){
        </span><span>return</span>  (<span>$a</span> > <span>$b</span>) ? ( (<span>$a</span> > <span>$c</span>) ? <span>$a</span> : <span>$c</span> ) : ( (<span>$b</span> > <span>$c</span>) ? <span>$b</span> : <span>$c</span><span> );
}
</span><span>echo</span> getMax(3,9,6)
Copy after login

<span>/*</span><span>*
* 题目:打印前一天的时间  格式:2015年10月15日 11:09:33
* strtotime函数使用 
* strtotime("now")  
* strtotime("-1 day");
* strtotime("+1 day");
* strtotime("+2 days");
* strtotime("+1 week");
* strtotime("+1 month");
* strtotime("+2 hours");
* strtotime("next Monday");
* strtotime("last Monday");
* strtotime("+1 week 3 days 7 hours 5 seconds");
</span><span>*/</span><span>
date_default_timezone_set(</span>"PRC"<span>);
</span><span>echo</span>  <span>date</span>("Y-m-d H:i:s",<span>strtotime</span>("-1 day"));
Copy after login

 

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Summary of front-end React interview questions in 2023 (Collection) Summary of front-end React interview questions in 2023 (Collection) Aug 04, 2020 pm 05:33 PM

As a well-known programming learning website, php Chinese website has compiled some React interview questions for you to help front-end developers prepare and clear React interview obstacles.

A complete collection of selected Web front-end interview questions and answers in 2023 (Collection) A complete collection of selected Web front-end interview questions and answers in 2023 (Collection) Apr 08, 2021 am 10:11 AM

This article summarizes some selected Web front-end interview questions worth collecting (with answers). It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Five common Go language interview questions and answers Five common Go language interview questions and answers Jun 01, 2023 pm 08:10 PM

As a programming language that has become very popular in recent years, Go language has become a hot spot for interviews in many companies and enterprises. For beginners of the Go language, how to answer relevant questions during the interview process is a question worth exploring. Here are five common Go language interview questions and answers for beginners’ reference. Please introduce how the garbage collection mechanism of Go language works? The garbage collection mechanism of the Go language is based on the mark-sweep algorithm and the three-color marking algorithm. When the memory space in the Go program is not enough, the Go garbage collector

50 Angular interview questions you must master (Collection) 50 Angular interview questions you must master (Collection) Jul 23, 2021 am 10:12 AM

This article will share with you 50 Angular interview questions that you must master. It will analyze these 50 interview questions from three parts: beginner, intermediate and advanced, and help you understand them thoroughly!

Interviewer: How much do you know about high concurrency? Me: emmm... Interviewer: How much do you know about high concurrency? Me: emmm... Jul 26, 2023 pm 04:07 PM

High concurrency is an experience that almost every programmer wants to have. The reason is simple: as traffic increases, various technical problems will be encountered, such as interface response timeout, increased CPU load, frequent GC, deadlock, large data storage, etc. These problems can promote our Continuous improvement in technical depth.

Sharing of Vue high-frequency interview questions in 2023 (with answer analysis) Sharing of Vue high-frequency interview questions in 2023 (with answer analysis) Aug 01, 2022 pm 08:08 PM

This article summarizes for you some selected vue high-frequency interview questions in 2023 (with answers) worth collecting. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

Summarize some common front-end interview questions (with answers) to help you consolidate your knowledge! Summarize some common front-end interview questions (with answers) to help you consolidate your knowledge! Jul 29, 2022 am 09:49 AM

The main purpose of publishing articles is to consolidate my knowledge and become more proficient. It is all based on my own understanding and the information I searched online. If there is something wrong, I hope you can give me some advice. Below are some common interview questions that I have summarized. I will continue to update them in order to supervise myself.

Take a look at these front-end interview questions to help you master high-frequency knowledge points (4) Take a look at these front-end interview questions to help you master high-frequency knowledge points (4) Feb 20, 2023 pm 07:19 PM

10 questions every day. After 100 days, you will have mastered all the high-frequency knowledge points of front-end interviews. Come on! ! ! , while reading the article, I hope you don’t look at the answer directly, but first think about whether you know it, and if so, what is your answer? Think about it and then compare it with the answer. Would it be better? Of course, if you have a better answer than mine, please leave a message in the comment area and discuss the beauty of technology together.

See all articles