php.org PHP Logo
Beginner Intermediate Advanced

Search results for: "object syntax"

In what situations might an object be mistakenly used as an array in PHP, leading to errors like "Cannot use object of type mysqli as array"?

When an object is mistakenly used as an array in PHP, it can lead to errors like "Cannot use object of type mysqli as array" because objects and array...

What is the correct syntax for creating an object of a class in PHP and setting its properties?

To create an object of a class in PHP and set its properties, you need to first instantiate the class using the `new` keyword and then use the arrow `...

How can the syntax error "unexpected 'new' (T_NEW)" be avoided when trying to instantiate a class with a mysqli connection in PHP?

To avoid the syntax error "unexpected 'new' (T_NEW)" when trying to instantiate a class with a mysqli connection in PHP, make sure to use the correct...

How can the issue of using object of type mysqli_result as array be resolved in PHP?

Issue: The error "Cannot use object of type mysqli_result as array" occurs when trying to access the result set of a MySQL query using array syntax. T...

Is $a->$b or $a-->b() a valid syntax in PHP and what does it mean?

The syntax $a->$b is valid in PHP and is used to access a property or method of an object stored in variable $a. However, $a-->b() is not valid syntax...

Showing 31 to 35 of 10000 results

‹ 1 2 3 4 5 6 7 8 9 10 ... 1999 2000 ›
PHP.ORG

A free knowledge base for PHP developers. Open to all.

Legal

  • About
  • Contact / Imprint
  • Terms
  • FAQ

© 2025 php.org. All rights reserved.