3v4l.org

run code in 300+ PHP versions simultaneously
<?php $variations = array( 'Variation' => array( 'SKU' => 'ML328-8.42-21.329', 'StartPrice' => 29.95, 'Quantity' => 1, 'VariationSpecifics' => array( 'NameValueList' => array( 0 => array( 'Name' => 'Farbe', 'Value' => 'schwarz' ), 1 => array( 'Name' => 'Größe', 'Value' => 145, ) ) ), 'SellingStatus' => array( 'QuantitySold' => 0, 'QuantitySoldByPickupInStore' => 0, ) ) ); foreach ($variations['Variation'] as $nr => $v) { $extendedVariations[$nr] = array ( 'StartPrice' => $v['StartPrice'], 'Quantity' => $v['Quantity'] ); if ( (array_key_exists('SellingStatus', $v)) && (array_key_exists('QuantitySold', $v['SellingStatus'])) && ($v['SellingStatus']['QuantitySold'] > 0) ) { $extendedVariations[$nr]['Quantity'] -= $v['SellingStatus']['QuantitySold']; } }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /in/9mHtj:29 Stack trace: #0 {main} thrown in /in/9mHtj on line 29
Process exited with code 255.

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:
36.83 ms | 401 KiB | 8 Q