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

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.110.0080.00020.94
8.3.100.0080.01124.06
8.3.90.0110.00726.77
8.3.80.0030.00619.36
8.3.70.0120.00617.00
8.3.60.0150.00018.56
8.3.50.0200.01024.71
8.3.40.0130.01018.92
8.3.30.0120.00318.97
8.3.20.0090.00024.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0000.00826.77
8.2.200.0070.00318.88
8.2.190.0040.01118.18
8.2.180.0100.01025.92
8.2.170.0160.00319.12
8.2.160.0100.00322.96
8.2.150.0050.00225.66
8.2.140.0030.00624.66
8.2.130.0100.00326.16
8.2.120.0080.00019.66
8.2.110.0000.00920.91
8.2.100.0080.00417.90
8.2.90.0080.00017.87
8.2.80.0030.00518.15
8.2.70.0080.00018.15
8.2.60.0050.00318.16
8.2.50.0040.00418.10
8.2.40.0000.00819.55
8.2.30.0050.00219.60
8.2.20.0040.00418.23
8.2.10.0000.00719.40
8.2.00.0000.00719.29
8.1.290.0070.00430.84
8.1.280.0110.00425.92
8.1.270.0000.00823.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0060.00321.97
8.1.230.0070.00420.92
8.1.220.0000.00917.76
8.1.210.0000.00819.10
8.1.200.0050.00317.48
8.1.190.0000.00817.47
8.1.180.0000.00818.10
8.1.170.0040.00418.69
8.1.160.0080.00019.07
8.1.150.0040.00418.91
8.1.140.0070.00018.99
8.1.130.0070.00017.73
8.1.120.0050.00217.69
8.1.110.0000.00717.70
8.1.100.0000.00817.70
8.1.90.0000.00717.72
8.1.80.0000.00717.73
8.1.70.0000.00717.68
8.1.60.0040.00417.72
8.1.50.0040.00417.68
8.1.40.0000.00817.64
8.1.30.0040.00417.77
8.1.20.0050.00517.71
8.1.10.0060.00317.77
8.1.00.0030.00517.78
8.0.300.0040.00419.76
8.0.290.0070.00017.00
8.0.280.0040.00418.41
8.0.270.0000.00717.05
8.0.260.0000.00717.07
8.0.250.0040.00417.18
8.0.240.0040.00717.07
8.0.230.0000.00817.15
8.0.220.0020.00517.18
8.0.210.0030.00317.10
8.0.200.0030.00617.22
8.0.190.0000.00817.19
8.0.180.0000.00717.13
8.0.170.0040.00417.11
8.0.160.0000.00817.00
8.0.150.0040.00417.07
8.0.140.0040.00417.09
8.0.130.0000.00613.50
8.0.120.0000.00717.04
8.0.110.0050.00217.12
8.0.100.0000.00817.10
8.0.90.0000.00717.18
8.0.80.0050.01017.11
8.0.70.0080.00017.08
8.0.60.0040.00417.10
8.0.50.0000.00817.07
8.0.30.0070.01417.32
8.0.20.0140.00517.32
8.0.10.0070.00017.27
8.0.00.0090.01217.13
7.4.330.0030.00315.55
7.4.320.0030.00316.83
7.4.300.0000.00616.66
7.4.290.0000.00716.65
7.4.280.0030.00616.76
7.4.270.0070.00016.73
7.4.260.0000.00613.43
7.4.250.0000.00716.75
7.4.240.0040.00416.82
7.4.230.0040.00416.48
7.4.220.0020.00516.66
7.4.210.0050.00916.74
7.4.200.0030.00316.55
7.4.130.0110.00916.74
7.4.120.0060.01216.71
7.4.110.0090.00916.80
7.4.100.0130.00416.77
7.4.90.0100.00716.83
7.4.80.0070.01419.39
7.4.70.0190.00016.64
7.4.60.0060.01216.59
7.4.50.0120.00616.81
7.4.40.0080.00816.48
7.4.30.0150.00916.75
7.4.20.0100.00616.53
7.4.10.0080.01116.67
7.4.00.0080.01216.84
7.3.330.0000.00716.33
7.3.320.0030.00313.30
7.3.310.0030.00316.57
7.3.300.0030.00316.48
7.3.290.0080.00616.41
7.3.260.0180.00616.83
7.3.240.0120.00516.56
7.3.230.0070.01016.69
7.3.210.0170.00016.71
7.3.200.0070.01016.60
7.3.190.0070.01316.80
7.3.180.0150.00716.45
7.3.170.0060.01116.76
7.3.160.0080.01316.41
7.3.150.0050.01916.68
7.3.140.0110.00816.50
7.3.130.0090.01416.48
7.3.120.0040.01516.67
7.3.110.0060.01216.43
7.3.100.0090.01216.62
7.3.90.0100.01016.44
7.3.80.0150.00616.80
7.3.70.0090.01416.49
7.3.60.0120.00916.63
7.3.50.0160.00516.51
7.3.40.0090.01216.50
7.3.30.0130.00816.55
7.3.20.0150.00816.64
7.3.10.0210.01116.45
7.3.00.0170.00616.57
7.2.330.0070.01416.78
7.2.320.0060.01717.02
7.2.310.0150.00317.10
7.2.300.0110.00616.94
7.2.290.0170.00816.96
7.2.280.0060.01816.78
7.2.270.0070.01116.57
7.2.260.0090.01416.97
7.2.250.0120.00616.66
7.2.240.0190.00016.77
7.2.230.0150.00616.75
7.2.220.0130.00916.66
7.2.210.0100.01316.95
7.2.200.0130.00816.84
7.2.190.0120.00916.75
7.2.180.0080.01216.92
7.2.170.0120.00916.66
7.2.160.0120.00816.54
7.2.150.0140.01116.93
7.2.140.0170.00616.68
7.2.130.0080.02016.71
7.2.120.0180.00616.86
7.2.110.0220.00816.71
7.2.100.0170.00916.89
7.2.90.0100.02016.68
7.2.80.0130.01016.62
7.2.70.0110.01716.77
7.2.60.0170.00716.61
7.2.50.0160.01116.84
7.2.40.0070.01916.62
7.2.30.0090.01816.92
7.2.20.0120.00916.88
7.2.10.0130.01016.63
7.2.00.0050.01916.83

preferences:
106.4 ms | 403 KiB | 5 Q