---
id: php-echo-print
title: "PHP Echo Print"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["echo vs print", "PHP μΆλ ₯"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.9
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["php", "programming", "w3schools", "echo", "print"]
raw_sources: ["https://www.w3schools.com/php/php_echo_print.asp"]
applied_in: []
github_commit: ""
---
# [[PHP Echo Print]]
## π― ν μ€ ν΅μ°° (One-line insight)
`print` returns 1 (usable inside expressions) while `echo` returns nothing at all β this is the functional difference behind an otherwise near-identical pair of output statements, alongside echo accepting multiple comma-separated arguments where print accepts exactly one. [S1]
## π§ ν΅μ¬ κ°λ
(Core concepts)
- **`echo`** β no return value; accepts multiple parameters; marginally faster than print. [S1]
- **`print`** β returns 1 (usable in expressions); accepts only one argument. [S1]
- **Both optional-parens** β `echo "x";` / `echo("x");` and `print "x";` / `print("x");` are equivalent. [S1]
- **Double vs. single quotes** β double quotes allow direct variable interpolation (`"$txt"`); single quotes require concatenation (`'...' . $txt . '...'`). [S1]
## π μΈλΆ λ΄μ© (Details)
- echo with multiple params: `echo "This ", "string ", "was ", "made ", "with multiple parameters.";`. [S1]
- Double-quote interpolation: `echo "
$txt1
";`. [S1]
- Single-quote concatenation: `echo '' . $txt1 . '
';`. [S1]
- print (single arg only): `print "Hello world!
";`. [S1]
## βοΈ λͺ¨μ λ° μ
λ°μ΄νΈ (Contradictions & updates)
- **λ°νκ° μ°¨μ΄**: echoλ λ°νκ°μ΄ μκ³ , printλ 1μ λ°ννμ¬ ννμ λ΄μμ μ¬μ© κ°λ₯νλ€λ μ μ΄ ν΅μ¬ μ°¨μ΄λ‘ λͺ
μλ¨. [S1]
## π οΈ μ μ© μ¬λ‘ (Applied in summary)
νμ¬ λ°κ²¬λ μ€μ μ μ© μ¬λ‘κ° μμ΅λλ€ β μ¬λ¬ λ¬Έμμ΄μ μ½€λ§λ‘ λμ΄ν΄ ν λ²μ μΆλ ₯νλ echoμ λ€μ€ μΈμ κΈ°λ₯μ΄ μ€μ μμ μμ£Ό μ°μΈλ€. [S1]
## π» μ½λ ν¨ν΄ (Code patterns)
echo with multiple comma-separated arguments (PHP):
```php
echo "This ", "string ", "was ", "made ", "with multiple parameters.";
```
## β
κ²μ¦ μν λ° μ λ’°λ
- **μν:** draft
- **κ²μ¦ λ¨κ³:** conceptual
- **μΆμ² μ λ’°λ:** B (W3Schools β widely used educational reference, not a primary standards body)
- **μ λ’° μ μ:** 0.90
- **μ€λ³΅ κ²μ¬ κ²°κ³Ό:** μ κ· μμ± (New discovery)
## π μ§μ κ·Έλν (Knowledge Graph)
- **μμ/루νΈ:** [[PHP Tutorial]]
- **κ΄λ ¨ κ°λ
:** [[PHP Variables]], [[PHP Data Types]], [[PHP String Concatenate]]
- **μ°Έμ‘° λ§₯λ½:** μΆλ ₯μ λ κ°μ§ λ°©λ² β λ°μ΄ν° νμ
(Data Types) μ±ν°λ‘ μ΄μ΄μ§.
## π μΆμ² (Sources)
- [S1] W3Schools β PHP echo and print Functions β https://www.w3schools.com/php/php_echo_print.asp
## π λ³κ²½ μ΄λ ₯ (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "PHP echo and print" page (Astra wiki-curation, P-Reinforce v3.1 format).