Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

PHP syntax and semantics

From Wikipedia, the free encyclopedia
This article needs to beupdated. Please help update this article to reflect recent events or newly available information.(June 2022)
Set of rules defining correctly structured programs

Thesyntax andsemantics ofPHP, aprogramming language, form a set of rules that define how a PHP program can be written and interpreted.

Overview

[edit]

Historically, the development of PHP has been somewhat haphazard. To counter this, the PHP Framework Interop Group (FIG) has created ThePHP Standards Recommendation (PSR) documents that have helped bring more standardization to the language since 2009.[1] The modern coding standards are contained in PSR-1 (Basic Coding Standard)[2] and PSR-2 (Coding Style Guide).[3]

Keywords

[edit]

Some keywords represent things that look like functions, some look like constants, but they are actually language constructs. It is forbidden to use any keywords as constants, class names, functions (with the exception ofreadonly) or methods. Using them as variable names is allowed, but it can be confusing.[4]

  • __halt_compiler()
  • abstract
  • and
  • array()
  • as
  • break
  • callable (as of PHP 5.4)
  • case
  • catch
  • class
  • clone
  • const
  • continue
  • declare
  • default
  • die()
  • do
  • echo
  • else
  • elseif
  • empty()
  • enddeclare
  • endfor
  • endforeach
  • endif
  • endswitch
  • endwhile
  • eval()
  • exit()
  • extends
  • final
  • finally (as of PHP 5.5)
  • fn (as of PHP 7.4)
  • for
  • foreach
  • function
  • global
  • goto (as of PHP 5.3)
  • if
  • implements
  • include
  • include_once
  • instanceof
  • insteadof (as of PHP 5.4)
  • interface
  • isset()
  • list()
  • match (as of PHP 8.0)
  • namespace (as of PHP 5.3)
  • new
  • or
  • print
  • private
  • protected
  • public
  • readonly (as of PHP 8.1.0)
  • require
  • require_once
  • return
  • static
  • switch
  • throw
  • trait (as of PHP 5.4)
  • try
  • unset()
  • use
  • var
  • while
  • xor
  • yield (as of PHP 5.5)
  • yield from (as of PHP 7.0)

Basic language constructs

[edit]

PHP generally followsC syntax, with exceptions and enhancements for its main use inweb development, which makes heavy use ofstring manipulation. PHP variables must be prefixed by "$". This allows PHP to performstring interpolation indouble quoted strings, wherebackslash is supported as anescape character. No escaping or interpolation is done on strings delimited bysingle quotes. PHP also supports a C-likesprintf function. Code can be modularized into functions defined with keywordfunction. PHP supports an optionalobject oriented coding style, with classes denoted by theclass keyword. Functions defined inside classes are sometimes calledmethods.Control structures include:if,while,do/while,for,foreach, andswitch. Statements are terminated by a semicolon, not line endings.[5]

Delimiters

[edit]

The PHP processor only parses code within itsdelimiters. Anything outside its delimiters is sent directly to the output and not parsed by PHP. The only open/close delimiters allowed by PSR-1[6] are "<?php" and "?>" or<?= and?>.

The purpose of the delimiting tags is to separate PHP code from non-PHP data (mainly HTML). Although rare in practice, PHP will execute code embedded in any file passed to its interpreter, includingbinary files such as PDF or JPEG files, or in server log files.[7][8] Everything outside the delimiters is ignored by the PHP parser and is passed through as output.[9]

These recommended delimiters create correctly formedXHTML and otherXML documents.[10] This may be helpful if the source code documents ever need to be processed in other ways during the life of the software.

If proper XML validation is not an issue, and a file contains only PHP code, it is preferable to omit the PHP closing (?>) tag at the end of the file.[11]

Non-recommended tags

[edit]

Other delimiters can be used on some servers, though most are no longer supported.[12] Examples are:

  • "<script language="php">" and "</script>" (removed in PHP7)
  • Short opening tags (<?) (configured with theshort_open_tag ini setting)
    • A special form of the<? tag is<?=, which automatically echos the next statement. Prior to PHP 5.4.0 this was also controlled withshort_open_tag, but is always available in later versions.
  • ASP style tags (<% or<%=) (removed in PHP7)

Variables and comments

[edit]

Variables are prefixed with adollar symbol and atype does not need to be specified in advance. Unlike function and class names, variable names are case-sensitive. Both double-quoted ("") andheredoc strings allow the ability to embed a variable's value into the string.[13] As in C, variables may becast to a specific type by prefixing the type in parentheses. PHP treatsnewlines aswhitespace, in the manner of afree-form language. Theconcatenation operator is. (dot). Array elements are accessed and set withsquare brackets in bothassociative arrays and indexed arrays.Curly brackets can be used to access array elements, but not to assign.

PHP has three types ofcomment syntax:/* */ which serves as block comments, and// as well as# which are used for inline comments.[14] Many examples use theprint function instead of theecho function. Both functions are nearly identical; the major difference being thatprint is slower thanecho because the former will return a status indicating if it was successful or not in addition to text to output, whereas the latter does not return a status and only returns the text for output.[15]

Simplest program

[edit]
Main article:"Hello, World!" program

The usual "Hello World" code example for PHP is:[16]

<?phpecho"Hello World!\n";?>

The example above outputs the following:

Hello World!

Instead of using<?php and theecho statement, an optional "shortcut" is the use of<?= instead of<?php which implicitly echoes data. For example:

<!DOCTYPE html><html><head><title>PHP "Hello, World!" program</title></head><body><p><?="Hello World!"?></p></body></html>

The above example also illustrates that text not contained within enclosing PHP tags will be directly output.

Operators

[edit]
Main articles:Operator (computer programming) andExpression (computer science)

PHP supports:arithmetic operators,assignment operators,bitwise operators,comparison operators, error control operators, execution operators,increment/decrement operators,logical operators,string operators, array operators,conditional assignment operators.[17]

Control structures

[edit]
Main articles:Control flow andStatement (computer science)

Conditionals

[edit]
Main article:Conditional (computer programming)

If ... else statement

[edit]

The syntax of a PHPif ... else statement is as follows:

if(condition){// statements;}elseif(condition2){// statements;}else{// statements;}

For single statements, the brackets may be omitted and the if optionally condensed to a single line:

if(condition)dosomething();elseif(condition2)dosomethingelse();elsedoyetathirdthing();

Ternary conditional operator

[edit]
Main article:Ternary conditional operator § PHP
$abs=$value>=0?$value:-$value;/* Equivalent to */if($value>=0){$abs=$value;}else{$abs=-$value;}
Elvis operator
[edit]
Main article:Elvis operator

Since PHP 5.3 supportsElvis operator (?:) in which it is possible to omit the middle part of the ternary operator.

$c=$a?:$b;/* Equivalent to */$c=$a?$a:$b;
Null coalescing operator
[edit]
Main article:Null coalescing operator § PHP

Since version 7.0 PHP also supportsNull coalescing operator (??).

$a=$b??$c;/* Equivalent to */$a=isset($b)?$b:$c;

Since version 7.4 PHP also supportsNull coalescing operator with the??= syntax.

$a??=$b;/* Equivalent to */$a=$a??$b;
Safe navigation operator
[edit]
Main article:Safe navigation operator § PHP

Since version 8.0 PHP also supportsSafe navigation operator (?->).

$variable=$object?->method();/* Equivalent to */$variable=$object!==null?$object->method():null;

Switch statement

[edit]
Main article:Switch statement § PHP

An example of the syntax of a PHPswitch statement is as follows:

switch(expr){case0:// statements;break;case1:// statements;break;case2:// statements;break;default:// statements;}

Note that unlike inC, values in case statement can be any type, not just integers.[18]

Match expression

[edit]

PHP 8 introduces thematch expression.[19] The match expression is conceptually similar to aswitch statement and is more compact for some use cases.[20]switch statements are traditionally favored for simple value-based comparisons,match statements provide more flexibility and readability, particularly when using in complex conditions or patterns[21]

echomatch(1){0=>'Foo',1=>'Bar',2=>'Baz',};//> Bar

Loops

[edit]
Main article:Control flow § Loops

For loop

[edit]
Main articles:Control flow § Count-controlled loops, andFor loop § 1995: PHP

The PHP syntax of afor loop is as follows:

for(initialization;condition;afterthought){// statements;}

While loop

[edit]
Main articles:Control flow § Condition-controlled loops, andWhile loop § PHP

The syntax for a PHPwhile loop is as follows:

while(condition){// statements;}

Do while loop

[edit]
Main articles:Control flow § Condition-controlled loops, andDo while loop § PHP

The syntax for a PHPdo while loop is as follows:

do{// statements;}while(condition);

For each loop

[edit]
Main articles:Control flow § Collection-controlled loops, andForeach loop § PHP

The syntax for a PHPfor each loop is as follows:

foreach($setas$value){// statements;}

Alternative syntax for control structures

[edit]

PHP offers an alternative syntax using colons rather than the standard curly-brace syntax (of "{...}"). This syntax affects the following control structures:if,while,for,foreach, andswitch. The syntax varies only slightly from the curly-brace syntax. In each case the opening brace ({) is replaced with a colon (:) and the close brace is replaced withendif;,endwhile;,endfor;,endforeach;, orendswitch;, respectively.[22] Mixing syntax styles within the same control block is not supported. An example of the syntax for anif/elseif statement is as follows:

if(condition):// code hereelseif(condition):// code hereelse:// code hereendif;

This style is sometimes called template syntax, as it is often found easier to read when combining PHP and HTML or JavaScript for conditional output:

<html><?phpif($day=='Thursday'):?><div>Tomorrow is Friday!</div><?phpelseif($day=='Friday'):?><div>TGIF</div><?phpelse:?><div>ugh</div><?phpendif;?></html>

Exception handling

[edit]
Main articles:Exception handling andException handling syntax § PHP

Runtime exception handling method in PHP is inherited from C++.[23]

functioninv($x){if($x==0){thrownewException('Division by zero');}return1/$x;}try{echoinv(2);// prints 0.5echoinv(0);// throw an exceptionechoinv(5);// will not run}catch(Exception$e){echo$e->getMessage();// prints Division by zero}// Continue executionecho"Hello";// prints Hello

Data types

[edit]

Scalar types

[edit]
Main article:Primitive data type

PHP supports four scalar types:bool,int,float,string.[24]

Boolean

[edit]
Main article:Boolean data type

PHP has a nativeBoolean type, named "bool", similar to the native Boolean types inJava andC++. Using the Boolean type conversion rules, non-zero values are interpreted astrue and zero asfalse, as inPerl.Both constantstrue andfalse are case-insensitive.[25]

Integer

[edit]
Main article:Integer (computer science)

PHP stores whole numbers in a platform-dependent range. This range is typically that of 32-bit or 64-bit signed integers.[26] Integer variables can be assigned using decimal (positive and negative),octal,hexadecimal, andbinary notations.

$a=1234;// decimal number$b=0321;// octal number (equivalent to 209 decimal)$c=0x1B;// hexadecimal number (equivalent to 27 decimal)$d=0b11;// binary number (equivalent to 3 decimal)$e=1_234_567;// decimal number (as of PHP 7.4.0)

Float

[edit]
Main article:Floating-point arithmetic

Real numbers are also stored in a platform-specific range. They can be specified usingfloating point notation, or two forms ofscientific notation.[27]

$a=1.234;$b=1.2e3;// 1200$c=7E-5;// 0.00007$d=1_234.567;// as of PHP 7.4.0

String

[edit]
Main articles:String (computer science),Escape sequences in C,String interpolation § PHP, andHere document § PHP

PHP supportsstrings, which can be used with single quotes, double quotes, nowdoc orheredoc syntax.[28]

Double quoted strings support variable interpolation:

$age='23';echo"John is$age years old";// John is 23 years old

Curly braces syntax:[29]

$f="sqrt";$x=25;echo"a$xc\n";// Warning:  Undefined variable $xcecho"a{$x}c\n";// prints a25cecho"a${x}c\n";// also prints a25cecho"$f($x) is{$f($x)}\n";// prints sqrt(25) is 5

Special types

[edit]
Main article:Null pointer

PHP supports two special types:null,resource.Thenull data type represents a variable that has no value. The only value in thenull data type isNULL. TheNULL constant is not case sensitive.[30] Variables of the "resource" type represent references to resources from external sources. These are typically created by functions from a particular extension, and can only be processed by functions from the same extension. Examples include file, image and database resources.[24]

Compound types

[edit]
Main article:Compound data type

PHP supports four compound types:array,object,callable,iterable.

Array

[edit]
Main articles:Associative array,Hash table, andComparison of programming languages (associative array) § PHP

Arrays can contain mixed elements of any type, including resources, objects.[31] Multi-dimensional arrays are created by assigning arrays as array elements. PHP has no true array type. PHP arrays are nativelysparse andassociative. Indexed arrays are simply hashes using integers as keys.

Indexed array:

$season=["Autumn","Winter","Spring","Summer"];echo$season[2];// Spring

Associative array:

$salary=["Alex"=>34000,"Bill"=>43000,"Jim"=>28000];echo$salary["Bill"];// 43000

Multidimensional array:

$mark=["Alex"=>["biology"=>73,"history"=>85],"Jim"=>["biology"=>86,"history"=>92]];echo$mark["Jim"]["history"];// 92

Object

[edit]
Main article:Object (computer science)

Theobject data type is a combination of variables, functions and data structures in theobject-oriented programming paradigm.

classPerson{//...}$person=newPerson();

Callable

[edit]
Main articles:Callable object § In PHP, andFunction object § In PHP

Since version 5.3 PHP hasfirst-class functions that can be used e.g. as an argument to another function.

functionrunner(callable$function,mixed...$args){return$function(...$args);}$f=fn($x,$y)=>$x**$y;functionsum(int|float...$args){returnarray_sum($args);}echorunner(fn($x)=>$x**2,2);// prints 4echorunner($f,2,3);// prints 8echorunner('sum',1,2,3,4);// prints 10

Iterable

[edit]
Main articles:Iterator § PHP,Iterator pattern § PHP, andGenerator (computer programming) § PHP

Iterable type indicate that variable can be used withforeach loop.[32] It can be anyarray orgenerator or object that implementing the special internalTraversable[33] interface.

functionprintSquares(iterable$data){foreach($dataas$value){echo($value**2)." ";}echo"\n";}// array$array=[1,2,3,4,5,6,7,8,9,10];// generator$generator=function():Generator{for($i=1;$i<=10;$i++){yield$i;}};// object$arrayIterator=newArrayIterator([1,2,3,4,5,6,7,8,9,10]);printSquares($array);// 1 4 9 16 25 36 49 64 81 100printSquares($generator());// 1 4 9 16 25 36 49 64 81 100printSquares($arrayIterator);// 1 4 9 16 25 36 49 64 81 100

Union types

[edit]
Main article:Union type § PHP

Union types were introduced in PHP 8.0[34]

functionfoo(string|int$foo):string|int{}

Functions

[edit]
Main articles:Function (computer programming),First-class function, andHigher-order function § PHP

PHP has hundreds of base functions and thousands more from extensions. Prior to PHP version 5.3.0, functions are notfirst-class functions and can only be referenced by their name, whereas PHP 5.3.0 introduces closures.[35] User-defined functions can be created at any time and without being prototyped.[35] Functions can be defined inside code blocks, permitting a run-time decision as to whether or not a function should be defined. There is no concept of local functions. Function calls must use parentheses with the exception of zero argument class constructor functions called with the PHPnew operator, where parentheses are optional.

An example function definition is the following:

functionhello($target='World'){echo"Hello$target!\n";}hello();// outputs "Hello World!"hello('Wikipedia');// outputs "Hello Wikipedia!"

Function calls may be made via variables, where the value of a variable contains the name of the function to call. This is illustrated in the following example:

functionhello(){return'Hello';}functionworld(){return"World!";}$function1='hello';$function2='world';echo"{$function1()}{$function2()}";

A default value for parameters can be assigned in the function definition, but prior to PHP 8.0 did not supportnamed parameters or parameter skipping.[36] Some core PHP developers have publicly expressed disappointment with this decision.[37] Others have suggested workarounds for this limitation.[38]

Named arguments

[edit]
Main article:Named arguments

Named arguments were introduced in PHP 8.0

functionpower($base,$exp){return$base**$exp;}// Using positional arguments:echopower(2,3);// prints 8// Using named arguments:echopower(base:2,exp:3);// prints 8echopower(exp:3,base:2);// prints 8

Type declaration

[edit]

Specifying the types of function parameters and function return values has been supported since PHP 7.0.[39]

Return type declaration:

functionsum($a,$b):float{return$a+$b;}var_dump(sum(1,2));// prints float(3)

Parameters typing:

functionsum(int$a,int$b){return$a+$b;}var_dump(sum(1,2));// prints int(3)var_dump(sum(1.6,2.3));// prints int(3)

Strict typing

[edit]

Without strict typing enabled:

$f1=fn($a,$b):int=>$a+$b;$f2=fn(int$a,int$b)=>$a+$b;var_dump($f1(1.3,2.6));// prints int(3)var_dump($f1(1,'2'));// prints int(3)var_dump($f2(1.3,2.6));// prints int(3)var_dump($f2(1,'2'));// prints int(3)

With strict typing enabled:

declare(strict_types=1);$f1=fn($a,$b):int=>$a+$b;$f2=fn(int$a,int$b)=>$a+$b;var_dump($f1(1.3,2.6));// Fatal error: Return value must be of type int, float returnedvar_dump($f1(1,'2'));// prints int(3)var_dump($f2(1.3,2.6));// Fatal error: Argument #1 ($a) must be of type int, float givenvar_dump($f2(1,'2'));// Fatal error: Argument #2 ($b) must be of type int, string given

Anonymous functions

[edit]
Main article:Anonymous functions § PHP

PHP supports trueanonymous functions as of version 5.3.[35] In previous versions, PHP only supported quasi-anonymous functions through thecreate_function() function.

$x=3;$func=function($z){return$z*2;};echo$func($x);// prints 6

Since version 7.4 PHP also supportsarrow functions syntax (=>).[40]

$x=3;$func=fn($z)=>$z*2;echo$func($x);// prints 6

Closures

[edit]
Main article:Closure (computer programming)

Сreating closures

$add=fn($x)=>fn($y)=>$y+$x;/* Equivalent to */$add=function($x){returnfunction($y)use($x){return$y+$x;};};

using

$f=$add(5);echo$f(3);// prints 8echo$add(2)(4);// prints 6

PHP

[edit]
This section is an excerpt fromVariadic function § In PHP.[edit]

PHP does not care about types of variadic arguments unless the argument is typed.

functionsum(...$nums):int{returnarray_sum($nums);}echosum(1,2,3);// 6

And typed variadic arguments:

functionsum(int...$nums):int{returnarray_sum($nums);}echosum(1,"a",3);// TypeError: Argument 2 passed to sum() must be of the type int (since PHP 7.3)

Generators

[edit]
Main articles:Generator (computer programming) § PHP, andLazy evaluation

Using generators, we can write code that uses foreach to iterate over a dataset without having to create an array in memory, which can result in memory overhead or significant processing time for generation.

Objects

[edit]
Main article:Object-oriented programming

Basicobject-oriented programming functionality was added in PHP 3.[41] Object handling was completely rewritten for PHP 5, expanding the feature set and enhancing performance.[42] In previous versions of PHP, objects were handled likeprimitive types.[42] The drawback of this method was that the whole object was copied when a variable was assigned or passed as a parameter to a method. In the new approach, objects are referenced byhandle, and not by value. PHP 5 introduced private and protectedmember variables and methods, along withabstract classes andfinal classes as well asabstract methods andfinal methods. It also introduced a standard way of declaringconstructors anddestructors, similar to that of other object-oriented languages such asC++, and a standardexception handling model. Furthermore PHP 5 addedInterfaces and allows for multiple Interfaces to be implemented. There are special interfaces that allow objects to interact with the runtime system.Objects implementingArrayAccess can be used with array syntax andobjects implementingIterator orIteratorAggregate can be used with the foreachlanguage construct. The static method andclass variable features in Zend Engine 2 do not work the way some would expect. There is novirtual table feature in the engine, sostatic variables are bound with a name instead of a reference at compile time.[43]

This example shows how to define a class,Foo, that inherits from classBar. The methodmyStaticMethod is a public static method that can be called withFoo::myStaticMethod();.

classFooextendsBar{function__construct(){$doo="wah dee dee";}publicstaticfunctionmyStaticMethod(){$dee="dee dee dum";}}

If the developer creates a copy of an object using the reserved wordclone, the Zend engine will check if a__clone() method has been defined or not. If not, it will call a default__clone() which will copy the object's properties. If a__clone() method is defined, then it will be responsible for setting the necessary properties in the created object. For convenience, the engine will supply a function that imports the properties of the source object, so that the programmer can start with a by-valuereplica of the source object and only override properties that need to be changed.[44]

Traits

[edit]
This section is an excerpt fromTrait (computer programming) § PHP.[edit]

This example uses a trait to enhance other classes:

// The templatetraitTSingleton{privatestatic$_instance=null;privatefunction__construct(){}// Must have private default constructor and be aware not to open it in the classpublicstaticfunctiongetInstance(){if(null===self::$_instance){self::$_instance=newself();}returnself::$_instance;}}classFrontController{useTSingleton;}// Can also be used in already extended classesclassWebSiteextendsSomeClass{useTSingleton;}

This allows simulating aspects of multiple inheritance:

traitTBounding{public$x,$y,$width,$height;}traitTMoveable{publicfunctionmoveTo($x,$y){// …}}traitTResizeable{publicfunctionresize($newWidth,$newHeight){// …}}classRectangle{useTBounding,TMoveable,TResizeable;publicfunctionfillColor($color){// …}}

See also

[edit]

References

[edit]
  1. ^PSR-Huh?
  2. ^PSR-1
  3. ^PSR-2
  4. ^PHP: List of Keywords - Manual
  5. ^"Instruction separation". The PHP Group. Retrieved2008-03-16.
  6. ^"PSR-1: Basic Coding Standard - PHP-FIG".
  7. ^"Code injection – a simple PHP virus carried in a JPEG image".
  8. ^Young, Susan; Aitel, Dave (24 November 2003).The Hacker's Handbook: The Strategy Behind Breaking into and Defending Networks.ISBN 9780203490044.
  9. ^"Your first PHP-enabled page". The PHP Group. Retrieved2008-02-25.
  10. ^Bray, Tim; et al. (26 November 2008)."Processing Instructions".Extensible Markup Language (XML) 1.0 (Fifth Edition). W3C. Retrieved2009-06-18.
  11. ^"PHP tags".
  12. ^"PHP: Basic syntax". The PHP Group. Retrieved2008-02-22.
  13. ^"Variables". The PHP Group. Retrieved2008-03-16.
  14. ^"Comments". The PHP Group. Retrieved2008-03-16.
  15. ^"print". The PHP Group. Retrieved2008-03-16.
  16. ^"Hello World". Code Newbie. Retrieved2008-02-25.
  17. ^"PHP: Operators - Manual". The PHP Group. Retrieved2021-01-30.
  18. ^"PHP: Switch - Manual".
  19. ^Redmond, Paul."Match Expression is Coming to PHP 8".Laravel News. Retrieved4 October 2020.
  20. ^"PHP 8.0: Match Expressions".PHP Watch. Retrieved4 October 2020.
  21. ^"Match or Switch in PHP".Techsouce. Retrieved27 July 2024.
  22. ^"Alternative syntax for control structures". The PHP Group. Retrieved2010-04-16.
  23. ^"PHP: Exceptions - Manual". The PHP Group. Retrieved2021-01-30.
  24. ^ab"Types". The PHP Group. Retrieved2008-03-16.
  25. ^"Booleans". The PHP Group. Retrieved2021-01-22.
  26. ^PHP: Integers - Manual
  27. ^"Floating point numbers". The PHP Group. Retrieved2021-01-22.
  28. ^"Strings". The PHP Group. Retrieved2008-03-21.
  29. ^"Complex (curly) syntax". The PHP Group. Retrieved2021-01-30.
  30. ^NULL
  31. ^"Arrays". The PHP Group. Retrieved2021-01-22.
  32. ^PHP: Iterables - Manual
  33. ^PHP: Traversable - Manual
  34. ^PHP RFC: Union Types 2.0
  35. ^abc"Functions". The PHP Group. Retrieved2008-03-16.
  36. ^"PHP 6 Dropped Items". The PHP Group. Retrieved2009-01-09.
  37. ^"Syntax I Miss in PHP". Stanislav Malyshev, Zend Technologies, Ltd. Retrieved2009-01-09.
  38. ^"PHP Skipped and Named Parameters". SEO Egghead Inc. Retrieved2009-01-09.
  39. ^"PHP: Type declarations - Manual". The PHP Group. Retrieved2021-02-28.
  40. ^PHP RFC: Arrow Functions 2.0
  41. ^"History of PHP and related projects". The PHP Group. Retrieved2008-02-25.
  42. ^ab"PHP 5 Object References". mjtsai. Retrieved2008-03-16.
  43. ^"Classes and Objects (PHP 5)". The PHP Group. Retrieved2008-03-16.
  44. ^"Object cloning". The PHP Group. Retrieved2008-03-16.
People
Resources
Implementations
Web frameworks
Testing
ORMs
IDEs
Widget toolkit
Retrieved from "https://en.wikipedia.org/w/index.php?title=PHP_syntax_and_semantics&oldid=1317665541"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp