src/Shutdown.php
public function prioritize(/*string*/ $id, /*int*/ $newPriority) {
    // Normalize priority.
    $newPriority = intval($newPriority);

    // The priority must be valid.
    if(self::PRIO_START <= $newPriority && self::PRIO_END >= $newPriority) {
      // The new priority must be different than old one.
      if(
        isset($this->priorities[$id]) &&
        $newPriority !== ($priority = $this->priorities[$id])
      ) {
        // Get the callback.
        $callback = $this->callbacks[$priority][$id];

        // Unregister from old priority.
        $this->releaseImpl($id, $priority);

        // Register new callback at the new priority.
        $this->registerImpl($id, $callback, $newPriority);
      }
    }
  }
public function prioritize(/*string*/ $id, /*int*/ $newPriority) {
    // Normalize priority.
    $newPriority = intval($newPriority);

    // The priority must be valid.
    if(self::PRIO_START <= $newPriority && self::PRIO_END >= $newPriority) {
      // The new priority must be different than old one.
      if(
        isset($this->priorities[$id]) &&
        $newPriority !== ($priority = $this->priorities[$id])
      ) {
        // Get the callback.
        $callback = $this->callbacks[$priority][$id];

        // Unregister from old priority.
        $this->releaseImpl($id, $priority);

        // Register new callback at the new priority.
        $this->registerImpl($id, $callback, $newPriority);
      }
    }
  }
public function prioritize ( /*string*/ $ id , /*int*/ $ newPriority ) { // Normalize priority. $ newPriority = intval ( $ newPriority ) ; // The priority must be valid. if ( self :: PRIO_START <= $ newPriority && self :: PRIO_END >= $ newPriority ) { // The new priority must be different than old one. if ( isset ( $ this -> priorities [ $ id ] ) && $ newPriority !== ( $ priority = $ this -> priorities [ $ id ] ) ) { // Get the callback. $ callback = $ this -> callbacks [ $ priority ] [ $ id ] ; // Unregister from old priority. $ this -> releaseImpl ( $ id , $ priority ) ; // Register new callback at the new priority. $ this -> registerImpl ( $ id , $ callback , $ newPriority ) ; } } }
Change a shutdown callback's priority to the specified one.

@param string $id unique identifier of this callback
@param int $newPriority of the callback
Change a shutdown callback s priority to the specified one .