PHP interview questions. PHP interview questions are all old ones, but they are often encountered during pen-level questions because these questions are messy and the knowledge points of the questions are difficult to classify, I just put a piece of the PHP interview questions.
The questions here are relatively old, but they are often encountered during the pen test, because these questions are relatively messy and the knowledge points of the test are not easy to classify.
/*** Question: minimum code implementation: calculate the maximum number of three * Three-object operator implementation */function getMax ($ a, $ B, $ c) {return ($ a> $ B )? ($ A> $ c )? $ A: $ c): ($ B> $ c )? $ B: $ c);} echo getMax (3,9, 6)
/*** Question: print the time format of the previous day: October 15, 2015 11:09:33 * use the strtotime function * 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"); */date_default_timezone_set ("PRC"); echo date ("Y-m-d H: I: s ", strtotime ("-1 day "));
Else the questions here are relatively old, but they are often encountered during the pen test, because these questions are relatively messy, the knowledge points of the test are not easy to classify, just put a piece...