Re: [PHP] This isn't infinitely recursive is it?

2009-07-30 Thread Jonathan Tapicer
Hi, Well, you will have an infinite recursion there if the mapping has cycles, something like A->B, B->C, C->A would generate an invite recursion. Checking if the mapping has cycles is pretty simple: you have to create a directed graph and then go through the graph in DFS marking each visited nod

[PHP] This isn't infinitely recursive is it?

2009-07-30 Thread Matt Neimeyer
I'm cleaning up some inherited code in our data import module. For a variety of reasons we have to support old standards of the import format. Since some of those old versions were created we have since renamed some fields in our data structure. So right now I've a hard map for some field names...