1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/pipe_operator/complex_ordering.phpt
Larry Garfield 1c09c0c832 RFC: Pipe operator (#17118)
Co-authored-by: Gina Peter Banyard <girgias@php.net>
Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-06-10 09:59:43 +02:00

21 lines
430 B
PHP

--TEST--
Functions are executed in the expected order
--FILE--
<?php
function foo() { echo __FUNCTION__, PHP_EOL; return 1; }
function bar() { echo __FUNCTION__, PHP_EOL; return false; }
function baz($in) { echo __FUNCTION__, PHP_EOL; return $in; }
function quux($in) { echo __FUNCTION__, PHP_EOL; return $in; }
$result = foo()
|> (bar() ? baz(...) : quux(...))
|> var_dump(...);
?>
--EXPECT--
foo
bar
quux
int(1)