!php/object 'N;' — YAML King 🌱

4.4K posts

!php/object 'N;' — YAML King 🌱 banner
!php/object 'N;' — YAML King 🌱

!php/object 'N;' — YAML King 🌱

@malukenho

Traditional Roman Catholic🇻🇦| Father | @phpestene co-founder | Sergipano, living in the Netherlands | PHP dev @Werkspot | C++ | Kotlin | Java

Amsterdam 🇳🇱 Sergipe 🇧🇷 Katılım Ağustos 2011
689 Takip Edilen742 Takipçiler
!php/object 'N;' — YAML King 🌱
@Phrlog How they're managed doesn't matter unless it is tightly coupled to a framework. In the scenario you described the "domain" entities happen to be saved via Doctrine. They're not doctrine entities, you can even have a map between your domain entities and doctrine. don't you agree?
English
1
0
1
96
Flávio Heleno
Flávio Heleno@flavioheleno·
@malukenho hey, have you got any sample projects, docs or whatever that shows how to organize projects following best practices?
English
1
0
0
27
!php/object 'N;' — YAML King 🌱
@mateusjatenee I got it! But I was expecting the no-reference version to take more memory because it is copying the values, right? Or is it taken by the GC right after the foreach is ended?
English
1
0
0
33
Mateus Guimarães
Mateus Guimarães@mateusjatenee·
@malukenho It's probably because of the reference count. When you pass it by reference, you're creating a reference (is_ref=1) and increasing the refcount, so PHP will not free that automatically. If you run gc_collect_cycles() it should clean it.
English
2
0
1
73
PHP Architect
PHP Architect@phparch·
@malukenho yeah, we are aware of that little mistake. Sorry about that. We were testing a new script that we were hoping would automate the sending of the newsletter. Spoiler Alert, The script didn't work 🫢
English
1
0
1
32