Skip to content

IT Books Reviews and Programming

JavaScript, JAVA, PHP, Android, CSS/HTML

  • Home Page
  • Books Reviews
  • Programming Tips
  • Contact

PHP 8.1 – New fsync() function

November 11, 2021November 11, 2021 by Administrator
sync team
sync team

Synchronize new changes to the file without re-opening the same file again. fsync() would also throw a warning when the file is not a file pointer. The interface is: fsync(resource $stream): bool.

Read morePHP 8.1 – New fsync() function

Categories PHP, ProgrammingTags file, php 8.1, readLeave a comment

PHP 8.1 – MySQLi: binding multiple values

November 11, 2021November 11, 2021 by Administrator
bindded note
bindded note

MySQLi is gettng a feature to bind arrays to execute($array) method in single call. This would apply to standard int index based arrays and associative arrays.

Read morePHP 8.1 – MySQLi: binding multiple values

Categories PHP, ProgrammingTags bind, database, php 8.1Leave a comment

PHP 8.1 – MySQLi: fetch_column()

November 11, 2021November 11, 2021 by Administrator
database icon with tick icon
database icon with tick icon

New function was added to retrieve first or any other column from the result set to MySQLi object. This follows the fetchColumn() method from PDO and behaves in the same manner.

Read morePHP 8.1 – MySQLi: fetch_column()

Categories PHP, ProgrammingTags database, pdo, php 8.1Leave a comment

PHP 8.1 – Default MySQLi Error Mode

November 11, 2021November 11, 2021 by Administrator
database icon with error icon
database icon with error icon

The default error mode for mysqli calls is now changed from silent mode to Exception mode. This doesn’t affect PDO object since PHP Data Object is already throwing Exception by default.

Read morePHP 8.1 – Default MySQLi Error Mode

Categories PHP, ProgrammingTags database, error, handling, php 8.1Leave a comment

PHP 8.1 – Secured $GLOBALS array

November 11, 2021November 11, 2021 by Administrator
globes, globals
globes, globals

Not much would care about this one, but it’s worth to mention that previously you could override the whole $GLOBALS variable with your custom data, now you can only modify its keys/aliases.

Read morePHP 8.1 – Secured $GLOBALS array

Categories PHP, ProgrammingTags array, globals, php 8.1Leave a comment

PHP 8.1 – New octal integer notation

November 11, 2021November 11, 2021 by Administrator
hex to decimal black board
hex to decimal black board

Forget about a case of checking 016 == 16 causing a false response, from now on any octal integer will have to be written in literal notation, which is 0o16 . This only applies to integer types, strings behavior are kept intact.

Read morePHP 8.1 – New octal integer notation

Categories PHP, ProgrammingTags float, int, octal, php 8.1Leave a comment

PHP 8.1 – New feature array_is_list()

November 11, 2021November 11, 2021 by Administrator
batman slapping for not checking a type of array
batman slapping for not checking a type of array

Added a new check to array to see if it contains only an int based keys in natural order (from 0 to n`). Useful when we want to ensure the array is consistent (untouched) and when we want to serialize an array to json to format of [0, 1, 2] instead of object properties.

Read morePHP 8.1 – New feature array_is_list()

Categories PHP, ProgrammingTags array, php 8.1, typingLeave a comment

PHP 8.1 – Support of merging string keys via Spread Operator

November 11, 2021November 11, 2021 by Administrator
dragon ball fusion, songo, vegeta, merging strings
dragon ball fusion, songo, vegeta, merging strings

Start merging arrays without array_merge() completely. Spread Operator have now a support of integer types of keys, as well as string types keys. So you can merge your arrays more safe than before. Merge away!

Read morePHP 8.1 – Support of merging string keys via Spread Operator

Categories PHP, ProgrammingTags merge, php 8.1, stringLeave a comment

PHP 8.1 – Deprecation when you pass NULL to non-null param

November 11, 2021November 11, 2021 by Administrator
missing tooth
missing tooth

So you have some random null values passed over to internal PHP function for non-null params? Well you are in trouble in PHP 8.1 and even more trouble when PHP 9 would pop in.

Read morePHP 8.1 – Deprecation when you pass NULL to non-null param

Categories PHP, ProgrammingTags deprecation, internal function, php 8.1Leave a comment

PHP 8.1 – ENUMS are here!

November 9, 2021November 9, 2021 by Administrator
selection between some types
limited selections, enums

Limit your variables with pre-selected values setup by using new scalar type of enum and by as cool and fun as JAVA or C# developers!

Read morePHP 8.1 – ENUMS are here!

Categories PHP, ProgrammingTags enumerations, php 8.1Leave a comment
Post navigation
Older posts
Newer posts
← Previous 1 2 3 … 5 Next →

Recent Posts

  • COMPLETE list of changes in PHP 8.1 – Features & Deprecations – Overview, October 2021

    COMPLETE list of changes in PHP 8.1 – Features & Deprecations – Overview, October 2021

    October 28, 2021
  • PHP 8.1 – Read-only class properties

    PHP 8.1 – Read-only class properties

    November 14, 2021
  • PHP 8.1 – Callable syntax

    PHP 8.1 – Callable syntax

    November 14, 2021
  • PHP 8.1 – Default parameters with “new” keyword

    PHP 8.1 – Default parameters with “new” keyword

    November 14, 2021
  • PHP 8.1 – New setAccessible() Reflection method

    PHP 8.1 – New setAccessible() Reflection method

    November 13, 2021
  • PHP 8.1 – Persistent class constants

    PHP 8.1 – Persistent class constants

    November 13, 2021

Archives

  • November 2021 (24)
  • October 2021 (2)
  • December 2020 (1)
  • September 2020 (1)
  • May 2020 (1)
  • March 2020 (1)
  • November 2019 (1)
  • October 2019 (1)
  • September 2019 (1)
  • August 2019 (1)
  • July 2019 (1)
  • April 2019 (1)
  • March 2019 (1)
  • January 2019 (1)
  • December 2018 (2)
  • November 2018 (4)

Facebook Fanpage

facebook it books reviews, java, android, php, sql

IT Books Reviews and Programming Fanpage

Categories

  • Books Reviews
  • laminas
  • PHP
  • Programming
March 2023
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  
« Nov    
© 2023 IT Books Reviews and Programming • blog.Omelak.com