3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Stripe; class Stripe{ protected $apiKey; protected $apiBase = 'https://api.stripe.com'; protected $apiUploadBase = 'https://uploads.stripe.com'; protected $version = '1.0.0'; protected $apiVersion = null; /* @return string API key */ public function getApiKey(){ return $this->apiKey; } /* @param $apiKey * Sets API Key for requests */ public function setApiKey($apiKey){ $this->apiKey = $apiKey; return $this; } /* @return string * return library version */ protected function getVersion(){ return $this->version; } /* * @return string * returns API version for requests; Null if not set. */ protected function getApiVersion(){ return $this->apiVersion; } /* * @param $version * Set API version for requests */ public function setApiVersion($version){ $this->apiVersion = $version; return $this; } } $stripe = new Stripe; $stripe->setApiKey('abc123')->setApiVersion('apiVersion'); $apikey = $stripe->getApiKey(); $apivers = $stripe->getApiVersion(); echo $apikey . PHP_EOL; echo $apivers . PHP_EOL;

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.60.0140.00018.55
8.3.50.0040.01416.63
8.3.40.0100.00718.92
8.3.30.0070.00718.58
8.3.20.0040.00421.86
8.3.10.0040.00421.89
8.3.00.0050.00318.16
8.2.180.0130.00718.41
8.2.170.0110.00422.96
8.2.160.0150.00621.25
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0040.00422.30
8.2.120.0000.00726.35
8.2.110.0100.00022.44
8.2.100.0090.00317.91
8.2.90.0000.00919.00
8.2.80.0080.00017.97
8.2.70.0080.00017.63
8.2.60.0030.00617.93
8.2.50.0030.00618.10
8.2.40.0000.00820.66
8.2.30.0000.00719.30
8.2.20.0040.00418.00
8.2.10.0040.00418.05
8.2.00.0040.00417.89
8.1.280.0090.00925.92
8.1.270.0070.00023.99
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0000.00821.36
8.1.230.0000.01119.06
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.22
8.1.190.0040.00417.53
8.1.180.0040.00418.10
8.1.170.0030.00618.51
8.1.160.0000.00818.83
8.1.150.0080.00020.04
8.1.140.0040.00419.43
8.1.130.0000.00717.34
8.1.120.0040.00417.43
8.1.110.0080.00017.45
8.1.100.0080.00017.47
8.1.90.0050.00217.42
8.1.80.0060.00317.41
8.1.70.0030.00317.40
8.1.60.0090.00017.61
8.1.50.0040.00417.53
8.1.40.0040.00417.52
8.1.30.0030.00617.52
8.1.20.0060.00317.63
8.1.10.0040.00417.48
8.1.00.0050.00317.45
8.0.300.0040.00420.11
8.0.290.0000.00816.88
8.0.280.0070.00018.39
8.0.270.0000.00717.20
8.0.260.0030.00316.82
8.0.250.0030.00316.85
8.0.240.0040.00416.75
8.0.230.0040.00416.98
8.0.220.0070.00016.80
8.0.210.0040.00416.92
8.0.200.0000.00716.94
8.0.190.0040.00416.94
8.0.180.0040.00416.83
8.0.170.0030.00316.87
8.0.160.0070.00016.96
8.0.150.0000.00716.93
8.0.140.0030.00316.85
8.0.130.0000.00513.30
8.0.120.0070.00016.83
8.0.110.0040.00416.96
8.0.100.0040.00416.81
8.0.90.0000.00716.77
8.0.80.0090.00616.85
8.0.70.0050.00216.69
8.0.60.0000.00816.79
8.0.50.0040.00416.79
8.0.30.0130.00616.89
8.0.20.0090.01017.40
8.0.10.0040.00417.03
8.0.00.0070.01116.67
7.4.330.0020.00215.55
7.4.320.0000.00616.39
7.4.300.0000.00616.51
7.4.290.0000.00916.56
7.4.280.0070.00016.48
7.4.270.0030.00316.55
7.4.260.0000.00513.27
7.4.250.0030.00716.47
7.4.240.0030.00316.53
7.4.230.0000.00716.67
7.4.220.0100.01616.45
7.4.210.0080.00616.57
7.4.200.0060.00316.44
7.4.160.0120.00516.50
7.4.150.0120.00617.40
7.4.140.0110.00917.86
7.4.130.0180.00716.39
7.4.120.0080.01116.56
7.4.110.0060.01516.62
7.4.100.0140.00416.53
7.4.90.0140.01016.55
7.4.80.0090.00619.39
7.4.70.0060.01116.50
7.4.60.0070.00716.38
7.4.50.0090.00616.43
7.4.40.0070.01016.36
7.4.30.0070.01016.74
7.4.00.0060.01014.91
7.3.330.0030.00313.15
7.3.320.0000.00513.43
7.3.310.0000.00716.18
7.3.300.0030.00316.31
7.3.290.0070.00716.33
7.3.280.0080.00916.32
7.3.270.0090.01017.40
7.3.260.0070.00916.53
7.3.250.0120.00716.32
7.3.240.0130.00616.55
7.3.230.0320.03716.37
7.3.210.0120.00416.49
7.3.200.0060.01216.60
7.3.190.0040.01316.46
7.3.180.0140.00316.37
7.3.170.0100.00616.23
7.3.160.0110.00516.38
7.3.120.0120.00614.57
7.3.110.0040.01115.02
7.3.100.0040.01214.58
7.3.90.0040.01214.80
7.3.80.0040.01114.93
7.3.70.0000.01314.91
7.3.60.0130.00314.53
7.3.50.0030.01314.88
7.3.40.0000.01614.86
7.3.30.0030.01314.71
7.3.20.0100.00316.30
7.3.10.0100.00516.57
7.3.00.0040.00816.58
7.2.330.0100.00716.47
7.2.320.0040.01516.89
7.2.310.0080.01116.61
7.2.300.0080.00816.68
7.2.290.0070.01416.34
7.2.250.0040.01115.30
7.2.240.0100.00715.23
7.2.230.0060.00915.02
7.2.220.0040.01115.14
7.2.210.0120.00315.17
7.2.200.0040.01114.92
7.2.190.0040.01115.14
7.2.180.0100.00315.10
7.2.170.0080.00615.00
7.2.160.0130.00314.95
7.2.150.0120.00016.98
7.2.140.0000.01816.88
7.2.130.0070.00516.84
7.2.120.0070.00916.71
7.2.110.0090.00316.89
7.2.100.0030.00616.81
7.2.90.0030.00917.06
7.2.80.0070.00616.79
7.2.70.0020.01016.74
7.2.60.0030.00816.95
7.2.50.0050.00816.73
7.2.40.0050.00716.84
7.2.30.0040.00916.88
7.2.20.0080.00616.97
7.2.10.0030.00816.70
7.2.00.0110.00517.52
7.1.330.0060.01015.70
7.1.320.0150.00015.81
7.1.310.0070.00715.80
7.1.300.0070.00715.76
7.1.290.0100.00315.69
7.1.280.0100.00015.67
7.1.270.0100.00315.45
7.1.260.0000.00915.59
7.1.250.0050.00815.70
7.1.200.0030.00615.46
7.1.70.0040.00417.17
7.1.60.1170.01033.14
7.1.50.0770.01333.02
7.1.40.0770.01032.38
7.1.30.0800.01332.75
7.1.20.0700.00732.59
7.1.10.0600.00314.76
7.1.00.0670.01314.99
7.0.200.0870.01014.99
7.0.190.0630.00714.90
7.0.180.0630.00314.43
7.0.170.1070.01014.16
7.0.160.0530.01014.16
7.0.150.0600.00714.34
7.0.140.0830.00314.35
7.0.130.0630.00314.45
7.0.120.0970.00314.72
7.0.110.0700.00714.42
7.0.100.0600.01014.56
7.0.90.0600.01014.53
7.0.80.0600.00714.63
7.0.70.0630.01014.52
7.0.60.0470.01014.17
7.0.50.0500.01314.56
7.0.40.1530.00314.52
7.0.30.0570.00714.59
7.0.20.0800.01714.55
7.0.10.0700.01314.46
7.0.00.0800.01014.58

preferences:
71.82 ms | 401 KiB | 5 Q