The GNU Compiler Collection and C++ standard library (libstdc++) are no longer built by default on platforms where clang is the system compiler.
Proposed way to build PHP 5.2.x from sources don't works on FreeBSD ⩾ 10.0, as far as it requires gcc installed.