Lines Matching refs:x
7 [![CI status](https://github.com/reactphp/promise/actions/workflows/ci.yml/badge.svg?branch=2.x)](https://github.com/reactphp/promise/actions)
649 ->then(function ($x) {
650 // $x will be the value passed to $deferred->resolve() below
651 // and returns a *new promise* for $x + 1
652 return $x + 1;
654 ->then(function ($x) {
655 // $x === 2
658 return $x + 1;
660 ->then(function ($x) {
661 // $x === 3
664 return $x + 1;
666 ->then(function ($x) {
667 // $x === 4
670 echo 'Resolve ' . $x;
689 ->then(function ($x) {
690 throw new \Exception($x + 1);
692 ->otherwise(function (\Exception $x) {
694 throw $x;
696 ->otherwise(function (\Exception $x) {
699 new \Exception($x->getMessage() + 1)
702 ->otherwise(function ($x) {
703 echo 'Reject ' . $x->getMessage(); // 3
718 ->then(function ($x) {
719 return $x + 1;
721 ->then(function ($x) {
722 throw new \Exception($x + 1);
724 ->otherwise(function (\Exception $x) {
727 return $x->getMessage() + 1;
729 ->then(function ($x) {
730 echo 'Mixed ' . $x; // 4