title: How to trigger XDebug profiler for a command line PHP script?
body: <p>XDebug offers the configuration directive <code>xdebug.profiler_enable_trigger</code> that allows to activate profiling by passing the GET or POST parameter &quot;XDEBUG_PROFILE&quot; when calling a script via HTTP. This is handy if you don't want profiling for ALL of your scripts but only for a few special cases without always changing your PHP configuration.</p>
  <p>Is there a way to achieve the same behavior for command line PHP programs? I tried to pass the <code>XDEBUG_PROFILE</code> as a command line argument but it didn't work.</p>
  <p>In general, profiling command line PHP works well, but I'd like to have the same per-call-flexibility as with a browser and HTTP server.</p>