Digital UK Design Blog

I found out two things today.

  1. The XSD for this XML:
    <someElement anAttribute="aValue">someValue</someElement>

    goes a little something like this:

    <xs:element name="someElement" type="some-element-def"
                         minOccurs="1" maxOccurs="1" />
    ...
    <xs:complexType name="some-element-def">
    <xs:simpleContent>
    <xs:extension base="xs:integer">
    <xs:attribute name="someAttribute" type="xs:boolean"
                             use="optional" />
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
  2. To get bzr 1.5 running on Ubuntu Hardy Heron add a couple of entries to /etc/apt/sources.list and re-run synaptic.
    deb-src http://ppa.launchpad.net/bzr/ubuntu hardy main
    deb http://ppa.launchpad.net/bzr/ubuntu hardy main
  3. To compile PHP4 with MySQL support other than the archaic bundled 3.x use --with-mysql=/usr

Xdebug for PHP

October 24, 2007 | Web Development | Stephen O'Neill | No Comments »

I have been using Xdebug for a while now during development of my PHP projects.

The feature that I have found most useful is its ability to create cachegrind files which can then be interpreted by tools such as KCacheGrind.

Cachegrind files contain all the function calls made in you PHP application – this can contain invaluable information which can help you streamline parts of your code which are unnecessarily wasteful. As an object-oriented programmer you sometimes get your head up in the clouds and need a bump down to earth as to how your code is going to perform in real life, kcachegrind helped me to identify some hard to find bottlenecks in my code.

Oh, and did I mention that it automatically dumps pretty stack traces?

©2006 - 2009 The Floating Frog