Home  >  Article  >  Backend Development  >  php bits and pieces

php bits and pieces

巴扎黑
巴扎黑Original
2016-11-12 14:49:451037browse

Define constants

define('LOGENABLE', true);

Initialize an empty array

$arr = array();

Get the length of the array

$length = count($arr);

Output statement

echo, printf, print_r, var_dump

Introduce (call) other php

require(), include()

These two functions are basically the same, the difference is that require fails After that, a fatal error will be given, and after include fails, just a warning will be given.


Statement:
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