Portál AbcLinuxu, 9. května 2025 00:36
======================================== 3. Deprecated Functionality ======================================== - The original MySQL extension is now deprecated, and will generate deprecation warnings when connecting to a database through mysql_connect(), mysql_pconnect() or by establishing an implicit connection. Use MySQLi or PDO instead. - The preg_replace /e modifier is now deprecated. Use preg_replace_callback instead. (https://wiki.php.net/rfc/remove_preg_replace_eval_modifier) - IntlDateFormatter::setTimeZoneID() and datefmt_set_timezone_id() are deprecated. Use IntlDateFormatter::setTimeZone() or datefmt_set_timezone() instead. - mcrypt_ecb(), mcrypt_cbc(), mcrypt_cfb() and mcrypt_ofb() now throw E_DEPRECATED. Their use was already previously discouraged in the docs, but that predated the existence of E_DEPRECATED.a
======================================== 4. Changed Functions ======================================== - pack()/unpack() had the following changes, which bring it more in line with Perl's behavior: - Implemented format character "Z": NULL padded string, with trailing NULL bytes removed. - Changed format character "a": this no longer removes trailing NULL bytes. - Changed format character "A": all trailing ASCII whitespace is now removed (defined as spaces, tabs, \r, \n and NULL). - MessageFormatter::format() and related functions now accepted named arguments and mixed numeric/named arguments in ICU 4.8+. - MessageFormatter::format() and related functions now don't error out when an insufficient argument count is provided. Instead, the placeholders will remain unsubstituted. - MessageFormatter::parse() and MessageFormat::format() (and their static equivalents) now don't throw away better than second precision in the arguments. - IntlDateFormatter::__construct and datefmt_create() now accept for the $timezone argument time zone identifiers, IntlTimeZone objects, DateTimeZone objects and NULL. It used to accept only time zone identifiers and NULL. Invalid time zone identifiers are no longer accepted. Emptry strings are no longer accepted. - The default time zone used in IntlDateFormatter::__construct and datefmt_create() (when the corresponding argument is not passed or NULL is passed) is now the one given by date_default_timezone_get(), not the default ICU time zone. - The time zone passed to the IntlDateFormatter is ignored if it is NULL and if the calendar passed is an IntlCalendar object -- in this case, the IntlCalendar's time zone will be used instead. Otherwise, the time zone specified in the $timezone argument is used instead. This does not affect old code, as IntlCalendar was introduced in this version. - IntlDateFormatter::__construct and datefmt_create() now accept for the $calendar argument also IntlCalendar objects. - IntlDateFormatter::getCalendar() and datefmt_get_calendar() return false if the IntlDateFormatter was set up with an IntlCalendar instead of the constants IntlDateFormatter::GREGORIAN/TRADITIONAL. IntlCalendar did not exist before this version. - IntlDateFormatter::setCalendar() and datefmt_set_calendar() now also accept an IntlCalendar object, in which case its time zone is taken. Passing a constant is still allowed, and still keeps the time zone. - IntlDateFormatter::format() and datefmt_format() now also accept an IntlCalendar object for formatting. - php_logo_guid(), php_egg_logo_guid(), php_real_logo_guid() and zend_logo_guid() have been removed - set_error_handler(NULL) can now be used to reset the error handler. Furthermore both set_error_handler(NULL) and set_exception_handler(NULL) will now return the previously defined error/exception handler. Previously bool(true) was returned. - setcookie(), setrawcookie() and ext/session now send Max-Age headers alongside Expires headers. (see https://wiki.php.net/rfc/cookie_max-age) - curl_setopt now accepts new option CURLOPT_SAFE_UPLOAD and CURLFile object for safer file uploads (see https://wiki.php.net/rfc/curl-file-upload) - Functions in the socket extension now do not emit warnings when the errno is EAGAIN, EWOULDBLOCK or EINPROGRESS.
1. nechápu, jak někdo v softu, kde má výtečná poleTo nemluvíš o PHP, že ne?
používá na parametry připojení 1 řetězec,Řetězec je podle mě nejlepší a neuniverzálnější metoda, bez ohledu na programovací jazyk.
Tak warning mysql_connect() se setká se spoustou "nadšených" ohlasů, hlavně v komerční sféře.Počítám, že nikdo neaktualizuje na svém produkčním serveru PHP (nebo obecně prakticky jakýkoli balík) jen tak hala bala bez nějakého zjišťování, co se změnilo. Takže každý ví dobředu do čeho jde a vzhledem k tomu, že afaik nejde o bezpečnostní aktualizaci, tak má každý času na upgrade aplikací habaděj... Vždyť je to teprv beta
Víš o nějakém jiném jazyku, kde můžeš takto elegantně pole znásilňovat?Jazyk, který má takto řešená pole je mi podezřelý už z principu. PHP ten obrázek dotváří tím, že má špatně řešených věcí mnohem víc. Ale na druhou stranu ano, znám ještě další oblíbený jazyk, který míchá slovníky/hashtable a indexovaná pole. Jmenuje se Lua.
Třeba se takto dá vtipně využít pro adresářové struktury.Nejsem si vědom toho, že by to v PHP šlo lépe než v jakémkoli jiném dynamickém jazyku.
O různých nastaveních lecčehos ani nepíšu.Nejsem si vědom toho, že by to v PHP šlo lépe než v jakémkoli jiném dynamickém jazyku.
Řetězec je hezký, dokud nenese vůči systému více informací, než je 1.Plácání prázdné slámy.
Vím o pár podnikatelích, co mají systémy, co pamatují ještě první PHP4. A minimálně jeden na tom má i docela klíčové prvky své práce.A?
Vím o pár podnikatelích, co mají systémy, co pamatují ještě první PHP4. A minimálně jeden na tom má i docela klíčové prvky své práce. Na druhou stranu klidně zkritizuji některé jeho "programátory", protože by mě nikdy nenapadlo použít serialize() jako úložiště pro nastavení, které je pak řádkem nacpáno do databáze. A to nejde o nic klíčového.Nic takového jsem nenapsal, ani jsem tím nic takového nemyslel. (Jinak ale pokud někomu stačí PHP4 a nejedná se o verzi s bezpečnostními problémy, tak proč ne...) Jinak když už máš tak v oblibě sarkastické parafrázování, tak taky přispěju svou troškou: Failer: Říká se, že kdo chce psat bít, hůl si vždy najde. Mně se podařilo najít samopal a dvě katany.
$ grep ^error_reporting php.ini-*
php.ini-development:error_reporting = E_ALL
php.ini-production:error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.