소식어떻게게시물주식별논의하다답변지도 시간

PHP 7-상수 배열

이제 배열 상수는 다음을 사용하여 정의 할 수 있습니다. define()함수. PHP 5.6에서는 다음을 사용해서 만 정의 할 수 있습니다.const 예어.

예

<?php
   //define a array using define function
   define('animals', [
      'dog',
      'cat',
      'bird'
   ]);
   print(animals[1]);
?>

다음 브라우저 출력을 생성합니다.

cat
PHP 7 튜토리얼
PHP 7 튜토리얼
PHP 7-소개
PHP 7-성능
PHP 7-환경 설정
PHP 7-스칼라 유형 선언
PHP 7-반환 유형 선언
PHP 7-Null 통합 연산자
PHP 7-우주선 운영자
PHP 7-상수 배열
PHP 7-익명 클래스
PHP 7-클로저 :: call ()
PHP 7-필터링 된 unserialize ()
PHP 7-IntlChar
PHP 7-CSPRNG
PHP 7-기대
PHP 7-문 사용
PHP 7-오류 처리
PHP 7-정수 나눗셈
PHP 7-세션 옵션
PHP 7-더 이상 사용되지 않는 기능
PHP 7-제거 된 확장 및 SAPI
PHP 7 유용한 리소스
PHP 7-퀵 가이드
ja/tutorial
es/tutorial
de/tutorial
fr/tutorial
th/tutorial
pt/tutorial
ru/tutorial
vi/tutorial
it/tutorial
ko/tutorial
tr/tutorial
id/tutorial
pl/tutorial
hi/tutorial
japost
espost
depost
frpost
thpost
ptpost
rupost
vipost
itpost
kopost
trpost
idpost
plpost
hipost

© Copyright 2021 - 2025 | All Rights Reserved