title: How to compile php module in php8.0 that used to use TSRMLS_CC in php7, but is deprecated in php8.0
body: <p>I have a php module that is build for php7 and i think php5 also, but in php8.0 when i try to run <code>make</code> i get a long list with errors because of TSRMLS_CC is beeing deprecated.</p>
  <p>The errors that are beeing displayed look like:</p>
  <pre><code>/home/appie/Downloads/php-sweph/sweph.c: In function ‘zif_swe_calc_ut’:
  /home/appie/Downloads/php-sweph/sweph.c:512:44: error: expected ‘)’ before ‘TSRMLS_CC’
    512 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, &quot;dll&quot;,
        |                                            ^~~~~~~~~
  /home/appie/Downloads/php-sweph/sweph.c:512:6: error: too few arguments to function ‘zend_parse_parameters’
    512 |  if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, &quot;dll&quot;,
  </code></pre>
  <p>I have many function that use this TSRMLS_CC and they all look like this:</p>
  <pre><code>PHP_FUNCTION(swe_calc_ut)
  {
      char *arg = NULL;
      int rc;
      long ipl, iflag;
      double tjd_ut, xx[6];
      char serr[AS_MAXCH]; 
      int i;
  
      if(ZEND_NUM_ARGS() != 3) WRONG_PARAM_COUNT;
      
          if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, &quot;dll&quot;,
              &amp;tjd_ut, &amp;ipl, &amp;iflag) == FAILURE) {
          return;
      }
  
      rc = swe_calc_ut(tjd_ut, (int)ipl, (int)iflag, xx, serr);
  
      /* create an array */
      array_init(return_value);
      for(i = 0; i &lt; 6; i++)
          add_index_double(return_value, i, xx[i]);
          add_assoc_string(return_value, &quot;serr&quot;, serr);
          add_assoc_long(return_value, &quot;rc&quot;, rc);
      }
  </code></pre>
  <p>My first thought was, what happens if i remove the TSRMLS_CC. After removal the compiling got finished and i could install the module into apache. Basicly the module works without problems now, but in the log of apache2. I get a long list of warnings from all the functions that use TSRMLS_CC.</p>
  <p>They look like:</p>
  <pre><code>PHP Warning:  Missing arginfo for swe_calc() in Unknown on line 0
  PHP Warning:  Missing arginfo for swe_calc_ut() in Unknown on line 0
  PHP Warning:  Missing arginfo for swe_fixstar() in Unknown on line 0
  </code></pre>
  <p>How do i get rid of the warnings, is there are alternative for TSRMLS_CC? I am trying to understand it, but was not able to solve it yet.</p>