3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataset = array( array( "product" => 4, "unit_amount" => "2020", "end_date" => date_timestamp_get(date_create("2020-07-12")) // Payment 1 Date ), array( "product" => 5, "unit_amount" => "2000", "end_date" => date_timestamp_get(date_create("2020-07-15")) //Payment 2 Date ), array( "product" => 6, "unit_amount" => "3400", "end_date" => date_timestamp_get(date_create("2020-07-16")) //Payment 3 Date ), array( "product" => 7, "unit_amount" => "3700", "end_date" => date_timestamp_get(date_create("2020-07-18")) //Payment 4 Date ), ); $phases = []; foreach ($dataset as $data) { $phases[] = [ 'end_date' => $data["end_date"], 'transfer_data' => [ 'amount_percent' => 20, 'destination' => 10], 'proration_behavior' => 'none', 'plans' => [ [ 'price_data' => [ 'unit_amount' => $data["unit_amount"], 'currency' => 'usd', 'product' => $data["product"], 'recurring' => [ 'interval' => 'month', ], ], ], ], ]; } $schedule_batch = array_chunk($phases, 2); $numberofbatches = count($schedule_batch); print_r($schedule_batch);

Abusive script

This script was stopped while abusing our resources

Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => Array ( [end_date] => 1594504800 [transfer_data] => Array ( [amount_percent] => 20 [destination] => 10 ) [proration_behavior] => none [plans] => Array ( [0] => Array ( [price_data] => Array ( [unit_amount] => 2020 [currency] => usd [product] => 4 [recurring] => Array ( [interval] => month ) ) ) ) ) [1] => Array ( [end_date] => 1594764000 [transfer_data] => Array ( [amount_percent] => 20 [destination] => 10 ) [proration_behavior] => none [plans] => Array ( [0] => Array ( [price_data] => Array ( [unit_amount] => 2000 [currency] => usd [product] => 5 [recurring] => Array ( [interval] => month ) ) ) ) ) ) [1] => Array ( [0] => Array ( [end_date] => 1594850400 [transfer_data] => Array ( [amount_percent] => 20 [destination] => 10 ) [proration_behavior] => none [plans] => Array ( [0] => Array ( [price_data] => Array ( [unit_amount] => 3400 [currency] => usd [product] => 6 [recurring] => Array ( [interval] => month ) ) ) ) ) [1] => Array ( [end_date] => 1595023200 [transfer_data] => Array ( [amount_percent] => 20 [destination] => 10 ) [proration_behavior] => none [plans] => Array ( [0] => Array ( [price_data] => Array ( [unit_amount] => 3700 [currency] => usd [product] => 7 [recurring] => Array ( [interval] => month ) ) ) ) ) ) )

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:
27.99 ms | 425 KiB | 5 Q