3v4l.org

run code in 300+ PHP versions simultaneously
<?php $subscription = json_decode('{ "Subscription": { "Id": 18849027, "Subscriptionstatus": 1, "NextBillingDate": "2018-07-08T15:31:08.654877", "NextBillingDateReminder": "2018-07-01T15:31:08.654877Z", "GracePeriodDays": 0, "StartIntervalDayCount": 0, "StartIntervalMonthCount": 1, "IntervalDayCount": 0, "IntervalMonthCount": 1, "CustomerId": 73771655, "CustomerReferenceId": "6kQ5CSMofkLdC0GQCn0EMgPzfAJ4ctN3F2JsAWQJ", "CustomerCurrencyId": "EUR", "CustomerReferenceNo": "", "LastIntervalNo": 22, "StartDate": "2016-08-08T15:31:08.654877", "EndDate": null, "Items": [ { "SubscriptionId": 18849027, "RunningNo": 1, "Quantity": 1, "ProductId": 82973, "ProductName": "FastBill Complete", "ProductNameExtension": "Monats-Abonnement", "RecurrenceCount": null, "Status": 1, "DeactivationDate": null, "StartDate": "2016-08-08T15:31:08.654877", "EndDate": null, "LastIntervalNo": 22, "IsCurrent": true, "Version": 1, "Couponcode": "", "PromotionId": null, "SubscriptionPurchaseItems": [ { "PurchaseId": 95742459, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 0 }, { "PurchaseId": 97512712, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 1 }, { "PurchaseId": 103064464, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 4 }, { "PurchaseId": 108481281, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 7 }, { "PurchaseId": 112016777, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 9 }, { "PurchaseId": 113701986, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 10 }, { "PurchaseId": 115302274, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 11 }, { "PurchaseId": 117286219, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 12 }, { "PurchaseId": 119449074, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 13 }, { "PurchaseId": 123308459, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 15 }, { "PurchaseId": 125233367, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 16 }, { "PurchaseId": 127322800, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 17 }, { "PurchaseId": 131151673, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 19 }, { "PurchaseId": 132734325, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 20 }, { "PurchaseId": 135749578, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 21 }, { "PurchaseId": 138141409, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 22 }, { "PurchaseId": 129265950, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 18 }, { "PurchaseId": 99299879, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 2 }, { "PurchaseId": 101140707, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 3 }, { "PurchaseId": 104979919, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 5 }, { "PurchaseId": 106823347, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 6 }, { "PurchaseId": 110335886, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 8 }, { "PurchaseId": 121485688, "PurchaseItemRunningNo": 1, "SubscriptionIntervalNo": 14 } ] } ] }, "ResultMessage": "OK" }'); function cmp($a, $b) { if ($a['SubscriptionIntervalNo'] == $b['SubscriptionIntervalNo']) { return 0; } return ($a['SubscriptionIntervalNo'] < $b['SubscriptionIntervalNo']) ? -1 : 1; } print_r($subscription->Subscription->Items[0]->SubscriptionPurchaseItems); print_r(usort($subscription->Subscription->Items[0]->SubscriptionPurchaseItems,"cmp")); print_r($subscription);

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.80.0060.00318.56
8.3.70.0150.00318.68
8.3.60.0090.00918.55
8.3.50.0130.00418.32
8.3.40.0140.00718.69
8.3.30.0100.01018.84
8.3.20.0000.00718.91
8.3.10.0000.00821.10
8.3.00.0050.00323.66
8.2.200.0030.00616.63
8.2.190.0070.01116.88
8.2.180.0070.01618.66
8.2.170.0120.00622.96
8.2.160.0110.00322.16
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00421.07
8.2.110.0070.00322.30
8.2.100.0070.00419.35
8.2.90.0050.00319.20
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0060.00318.03
8.2.50.0050.00318.07
8.2.40.0080.00019.94
8.2.30.0040.00818.05
8.2.20.0030.00618.01
8.2.10.0000.00718.22
8.2.00.0070.00019.53
8.1.290.0070.00330.84
8.1.280.0130.00325.92
8.1.270.0030.00522.05
8.1.260.0040.00426.35
8.1.250.0030.00728.09
8.1.240.0060.00324.03
8.1.230.0040.00722.26
8.1.220.0050.00317.79
8.1.210.0080.00018.77
8.1.200.0040.00417.25
8.1.190.0000.00917.13
8.1.180.0060.00318.10
8.1.170.0040.00418.59
8.1.160.0100.00018.79
8.1.150.0040.00418.90
8.1.140.0000.00717.61
8.1.130.0030.00318.95
8.1.120.0000.00717.42
8.1.110.0030.00517.33
8.1.100.0060.00317.37
8.1.90.0020.00517.31
8.1.80.0040.00417.39
8.1.70.0000.00817.27
8.1.60.0040.00417.41
8.1.50.0030.00617.51
8.1.40.0060.00317.53
8.1.30.0040.00417.56
8.1.20.0030.00617.51
8.1.10.0040.00417.46
8.1.00.0030.00517.52
8.0.300.0070.00018.77
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0070.00017.32
8.0.260.0040.00417.21
8.0.250.0000.00716.84
8.0.240.0000.00717.01
8.0.230.0000.00716.95
8.0.220.0050.00316.97
8.0.210.0000.00716.84
8.0.200.0000.00716.86
8.0.190.0040.00416.90
8.0.180.0060.00317.01
8.0.170.0030.00516.82
8.0.160.0040.00416.87
8.0.150.0050.00316.92
8.0.140.0040.00416.84
8.0.130.0000.00513.29
8.0.120.0080.00016.90
8.0.110.0070.00016.86
8.0.100.0000.00716.80
8.0.90.0030.00516.75
8.0.80.0080.00716.85
8.0.70.0070.00016.94
8.0.60.0050.00316.95
8.0.50.0050.00216.93
8.0.30.0110.00817.09
8.0.20.0090.01217.40
8.0.10.0030.00517.09
8.0.00.0110.00816.86
7.4.330.0000.00615.55
7.4.320.0000.00616.59
7.4.300.0000.00616.59
7.4.290.0070.00016.46
7.4.280.0000.00816.41
7.4.270.0050.00316.62
7.4.260.0030.00416.50
7.4.250.0030.00316.38
7.4.240.0070.00016.52
7.4.230.0030.00316.61
7.4.220.0040.00416.35
7.4.210.0080.00816.70
7.4.200.0070.00016.43
7.4.160.0100.00716.51
7.4.140.0090.01017.86
7.4.130.0090.00816.54
7.4.120.0110.01016.55
7.4.110.0040.01516.55
7.4.100.0110.00616.34
7.4.90.0070.01016.54
7.4.80.0030.01519.39
7.4.70.0070.01116.63
7.4.60.0030.01916.72
7.4.50.0060.00916.22
7.4.40.0100.00716.55
7.3.330.0000.00513.34
7.3.320.0000.00513.35
7.3.310.0040.00416.28
7.3.300.0000.00716.38
7.3.290.0000.00716.24
7.3.280.0100.01016.38
7.3.260.0090.00916.47
7.3.240.0110.00716.48
7.3.230.0170.00016.32
7.3.210.0110.00816.51
7.3.200.0140.00716.55
7.3.190.0080.00916.43
7.3.180.0100.00616.50
7.3.170.0070.01116.50
7.3.160.0130.00316.34
7.2.330.0120.00616.73
7.2.320.0130.00416.43
7.2.310.0080.01316.68
7.2.300.0130.00916.53
7.2.290.0080.00816.45
7.2.60.1800.00915.06
7.2.50.1460.01114.78
7.2.40.1710.01015.28
7.2.30.1730.00615.23
7.2.20.1720.00715.42
7.2.10.1420.00915.32
7.2.00.1280.01215.50
7.1.170.1380.00813.86
7.1.160.1220.01116.70
7.1.150.1290.00916.43
7.1.140.1600.00516.52
7.1.130.1500.00716.70
7.1.120.1280.00916.85
7.1.110.1710.00915.82
7.1.100.1470.01215.97
7.1.90.1250.01016.11
7.1.80.1400.00916.07
7.1.70.1420.01015.52
7.1.60.1560.01333.33
7.1.50.1680.00732.91
7.1.40.1740.01532.62
7.1.30.1780.01532.75
7.1.20.1700.01132.77
7.1.10.1650.01214.71
7.1.00.1590.01214.99

preferences:
27.89 ms | 401 KiB | 5 Q