# Catch mxmlc output with php

**URL:** <https://forum.kirupa.com/t/catch-mxmlc-output-with-php/301427>\
**Category:** Uncategorized\
**Created:** [December 9, 2009, 6:12am UTC](https://forum.kirupa.com/t/catch-mxmlc-output-with-php/301427 "2009-12-09T06:12:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shritesh22](https://avatars.discourse-cdn.com/v4/letter/s/c89c15/32.png) [@shritesh22](https://forum.kirupa.com/u/shritesh22)\
**Post date:** [December 9, 2009, 6:12am UTC](https://forum.kirupa.com/t/catch-mxmlc-output-with-php/301427/1 "2009-12-09T06:12:18Z")

</div>

Dear All,

Thanks in advance.

I am compiling an .as file with mxmlc on the fly using PHP.

CODE:

exec(“mxmlc example.as”,$retval,$success);  
print\_r($retval);

The output of above is just:  
Array ( [0] =\> Loading configuration file /site/fsdk/frameworks/flex-config.xml )

Whereas actually, when I execute “mxmlc example.as” (From command line linux) I get many errors as:

public class My\_273860 extends Sprite asdfasfasf  
^

I want to catch all the errors:

Please help,  
Thanks.
