Yes, there is! I didn’t find it at first, but wp cli offers a command called eval-file
which does what you want:
$ echo '<?php echo is_wp_error("foo") ? 1 : 0;' > example.php
$ wp eval-file example.php
0
Yes, there is! I didn’t find it at first, but wp cli offers a command called eval-file
which does what you want:
$ echo '<?php echo is_wp_error("foo") ? 1 : 0;' > example.php
$ wp eval-file example.php
0