Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.javascript > #4880
| Path | csiph.com!aioe.org!news.mb-net.net!open-news-network.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | de.comp.lang.javascript |
| Subject | Re: Warum funktioniert das nicht (Variable aus DB> JS) |
| Date | Tue, 27 Jun 2017 11:30:47 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 42 |
| Message-ID | <2593417.VdNmn5OnKV@PointedEars.de> (permalink) |
| References | <oir0uu$h9h$1@news.albasani.net> <oit0iv$4po$1@news.albasani.net> |
| Reply-To | Thomas 'PointedEars' Lahn <usenet@PointedEars.de> |
| NNTP-Posting-Host | 2.227.197.178.dynamic.wless.zhbmb00p-cgnat.res.cust.swisscom.ch |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | gwaiyur.mb-net.net 1498555848 9447 178.197.227.2 (27 Jun 2017 09:30:48 GMT) |
| X-Complaints-To | abuse@open-news-network.org |
| NNTP-Posting-Date | Tue, 27 Jun 2017 09:30:48 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-Face | %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v |
| Face | iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== |
| Xref | csiph.com de.comp.lang.javascript:4880 |
Show key headers only | View raw
Gerome Muent wrote:
> Falsch:
> var
> df=Carbon\Carbon::now()-
>format(\App\Setting::getSettingFor("DATE_FORMAT"));
>
>
> Richtig :
> var df=<?php
> echo Carbon\Carbon::now()
> ->format(\App\Setting::getSettingFor("DATE_FORMAT")); ?>;
Wie Christoph gestern schon schrieb: Korrekt ist dann
var df = "<?= … ?>";
Denn ein PHP-String ist nicht automatisch ein ECMAScript-String – die
String-Begrenzer sind daher in ECMAScript erforderlich – und die
short_open_tag-Syntax ist seit PHP 5.4 (ab der sie nicht länger von der
gleichnamigen Einstellung abhängt) zu bevorzugen:
<http://php.net/manual/en/ini.core.php#ini.short-open-tag>
PHP 5.4.0 wurde übrigens am 1. März *2012* released und hat bereits *vor
über einem Jahr* sein End-of-Life erreicht:
<http://php.net/eol.php>
Die aktuellen stabilen Versionen sind 5.6.30, 7.0.20 und 7.1.6:
<http://php.net/>
<http://php.net/supported-versions.php>
Jetzt haben wir Mitte *2017*. Ich empfehle daher *dringend*, das eigene
PHP-Wissen mal wieder aufzufrischen und auch die Software upzugraden.
--
PointedEars (ZCE PHP)
Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to de.comp.lang.javascript | Previous | Next — Previous in thread | Find similar
Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <bforpc@yahoo.de> - 2017-06-26 15:07 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-26 15:11 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-26 15:26 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-26 15:32 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-26 15:52 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-27 07:07 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-27 14:54 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) "Christoph M. Becker" <cmbecker69@arcor.de> - 2017-06-27 15:54 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-27 19:35 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-28 19:30 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Jan Novak <repcom@gmail.com> - 2017-06-29 17:20 +0200
OT: Editor (war: Warum funktioniert das nicht (Variable aus DB> JS)) Jan Novak <repcom@gmail.com> - 2017-06-29 20:28 +0200
Re: OT: Editor Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-30 01:51 +0200
Re: OT: Editor Jan Novak <repcom@gmail.com> - 2017-06-30 09:14 +0200
Re: OT: Editor Jan Novak <repcom@gmail.com> - 2017-06-30 10:08 +0200
Re: OT: Editor Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-30 16:51 +0200
Programmierung mit Atom (was: OT: Editor) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-09-11 19:05 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Gerome Muent <kontakt@bmservices.de> - 2017-06-27 09:13 +0200
Re: Warum funktioniert das nicht (Variable aus DB> JS) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-06-27 11:30 +0200
csiph-web