Doc #76553 [Asn->Csd]: [RU] ÐÐ¼Ñ Ð¿ÐµÑеменной Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ
ÑпÑавлÑÑÑие
| From: | sergey@php.net | Date: | Wed, 28 Apr 2021 13:42:48 +0000 |
| Subject: | Doc #76553 [Asn->Csd]: [RU] ÐÐ¼Ñ Ð¿ÐµÑеменной Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ ÑпÑавлÑÑÑие |
||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18737@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76553&edit=1
ID: 76553
Updated by: sergey@php.net
Reported by: byred at mail dot ru
Summary: [RU] ÐÐ¼Ñ Ð¿ÐµÑеменной можеÑ
ÑодеÑжаÑÑ
ÑпÑавлÑÑÑие
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Translation problem
Operating System: Win OS
PHP Version: 5.6.36
Assigned To: sergey
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-07-01 00:17:47] a at b dot c dot de
Well, first of all, the range 127-255 doesn't include any of !, +, -, or = (which have
respective byte values, 33, 43, 45, and 61).
Second, the distinction is _semantics_ versus _syntax_. *Semantically* variables can have much more
elaborate names than can be written *syntactically*. The description given on the page is for the
syntax as written in PHP source code.
But variables can be created (and named) by methods other than simply being written in source. As
your test script shows, you can't actually write a variable as "$ " but instead you
have to write something that amounts to defining a string expression and then searching for variable
with a matching name. You could also write it as ${"\t"} or ${chr(9)} or ${other arbitrary
expression that evaluates to "\t"}.
------------------------------------------------------------------------
[2018-06-29 20:59:19] byred at mail dot ru
Description:
------------
---
From manual page: http://www.php.net/language.variables.basics
---
Ðак понимаÑÑ Ñлова в
манÑале: "Ðод бÑквами здеÑÑ
подÑазÑмеваÑÑÑÑ ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ a-z, A-Z
и байÑÑ Ð¾Ñ 127 до 255 (0x7f-0xff). "?
ÐÑли в пÑомежÑÑке Ð¼ÐµÐ¶Ð´Ñ 127 и 255
наÑ
одÑÑÑÑ ÑÐ¸Ð¼Ð²Ð¾Ð»Ñ Ð²Ñоде: ! + - = и
Ñ.п
Рв Ñоже вÑемÑ, можно
пÑиÑвоиÑÑ Ð¸Ð¼ÐµÐ½Ð¸ пеÑеменной
Ñимвол ÑабÑлÑÑии или дÑÑгой
ÑпÑавлÑÑÑий Ñимвол (Ñм.код)
Test script:
---------------
<?php
echo '<pre>';
$name = chr(9);
$$name = "somedata";
echo ${' '}; // tab symblol
echo "\n";
print_r(get_defined_vars());
echo '</pre>';
?>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76553&edit=1