We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Weird var_dump on a row when SELECT *


I have some issue using SELECT * from models.

When I use something like SELECT name, id FROM Model i get a nice expected output of:

object(Phalcon\Mvc\Model\Row)#132 (2) {
  string(6) "myteam"
  string(1) "1"

But When i use SELECT * FROM Model I get a string from hell. It looks like a dump of my entire DepencyInjector.

So are you not supposed to use SELECT * When using PHQL and Models, or am I missing something (again ) :)

Regards André


use toArray() to see what's inside or xdebug.

It is what it is :D

Hi @Izo

I can see content of the result, it is however an array of unimaginable size :) Containing my config and my di. And I fail to see the connection to how my select result can contain my entire di container :)



the same for me, xdebug helps me a lot to see what i am diging for. If xdebug is present the size is much smaller ( almost fully readable ).

I am not sure there is a solution for this. Lets see if someone else will comment

edited Jan '16

havent configured xdebug for my IDE :( next on my list.

However if I use \Model::findFirst(array(`id`=>$uid)) Then I get the expected reslut.

I'll investigate using xdebug.