There is no converter, but You may take a look at Haxe. It's multi-platform open source language that can be compiled into other languages, including C#. The syntax is similar to PHP.
Anyhow, for this code snippet converting manually would be best approach.