3v4l.org

run code in 300+ PHP versions simultaneously
<?php $contents = <<<DATA [transactionDetails] => wsTransactionDetail Object ( [sharesAmount] => [sharesNumber] => [amount] => 33450 [commerceCode] => 1234567890 [buyOrder] => 123321 ) [detailOutput] => wsTransactionDetailOutput Object ( [authorizationCode] => 001122 [paymentTypeCode] => VD [responseCode] => 0 [sharesNumber] => 0 [amount] => 33450 [commerceCode] => 1234567890 [buyOrder] => 123321 ) DATA; $pattern = "~^\h*\[detailOutput] => .*(?:\R(?!\h*\[authorizationCode]).*)*\R\h*(\[authorizationCode] => \d+)(?:\R(?!\h*\[amount]).*)*\R\h*(\[amount] => \d+)~m"; if(preg_match_all($pattern, $contents, $matches, PREG_SET_ORDER, 0)){ echo "Founds:\n"; echo implode("\n", $matches[0]); }
Output for git.master, git.master_jit, rfc.property-hooks
Founds: [detailOutput] => wsTransactionDetailOutput Object ( [authorizationCode] => 001122 [paymentTypeCode] => VD [responseCode] => 0 [sharesNumber] => 0 [amount] => 33450 [authorizationCode] => 001122 [amount] => 33450

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.25 ms | 406 KiB | 5 Q