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 */ protected 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.0060.00918.68
8.3.50.0140.00716.62
8.3.40.0110.00418.87
8.3.30.0070.00718.59
8.3.20.0070.00021.73
8.3.10.0040.00421.88
8.3.00.0040.00417.93
8.2.180.0040.01518.51
8.2.170.0060.00922.96
8.2.160.0070.00720.95
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00422.25
8.2.120.0040.00426.35
8.2.110.0030.00622.32
8.2.100.0110.00017.59
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0000.00817.50
8.2.60.0040.00417.93
8.2.50.0040.00418.10
8.2.40.0040.00420.47
8.2.30.0080.00019.04
8.2.20.0000.00717.91
8.2.10.0040.00418.08
8.2.00.0040.00418.05
8.1.280.0100.00725.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00621.25
8.1.230.0080.00319.09
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0080.00017.53
8.1.180.0040.00418.10
8.1.170.0080.00018.57
8.1.160.0000.00818.68
8.1.150.0000.00719.99
8.1.140.0000.00719.57
8.1.130.0040.00418.84
8.1.120.0000.00717.34
8.1.110.0040.00417.34
8.1.100.0070.00017.45
8.1.90.0040.00417.43
8.1.80.0040.00417.33
8.1.70.0030.00317.23
8.1.60.0040.00417.62
8.1.50.0000.00817.51
8.1.40.0040.00417.57
8.1.30.0000.00817.65
8.1.20.0000.00817.57
8.1.10.0000.00817.45
8.1.00.0040.00417.53
8.0.300.0000.00720.09
8.0.290.0090.00016.63
8.0.280.0040.00318.38
8.0.270.0030.00317.27
8.0.260.0080.00016.86
8.0.250.0030.00316.84
8.0.240.0040.00416.86
8.0.230.0020.00517.00
8.0.220.0000.00716.89
8.0.210.0000.00716.79
8.0.200.0000.00816.89
8.0.190.0030.00516.98
8.0.180.0040.00416.98
8.0.170.0040.00416.98
8.0.160.0070.00016.94
8.0.150.0070.00016.83
8.0.140.0000.00816.75
8.0.130.0000.00513.32
8.0.120.0000.00716.82
8.0.110.0040.00416.84
8.0.100.0070.00016.73
8.0.90.0040.00416.85
8.0.80.0060.00916.89
8.0.70.0020.00516.93
8.0.60.0000.00816.77
8.0.50.0040.00417.01
8.0.30.0130.00717.02
8.0.20.0070.01117.40
8.0.10.0040.00416.95
8.0.00.0090.00816.50
7.4.330.0000.00515.55
7.4.320.0000.00616.56
7.4.300.0030.00316.60
7.4.290.0030.00616.46
7.4.280.0000.00716.52
7.4.270.0030.00316.50
7.4.260.0000.00513.17
7.4.250.0000.00916.45
7.4.240.0080.00016.49
7.4.230.0030.00316.51
7.4.220.0040.02316.61
7.4.210.0100.00316.54
7.4.200.0040.00416.60
7.4.160.0120.00716.56
7.4.150.0100.01317.40
7.4.140.0090.00717.86
7.4.130.0150.00616.51
7.4.120.0110.00916.49
7.4.110.0190.00316.52
7.4.100.0080.00816.47
7.4.90.0170.00716.57
7.4.80.0070.01119.39
7.4.70.0100.00716.58
7.4.60.0060.00916.66
7.4.50.0100.00316.58
7.4.40.0070.01016.56
7.4.30.0100.00616.36
7.4.10.0160.00015.13
7.4.00.0080.00814.96
7.3.330.0060.00013.36
7.3.320.0050.00013.32
7.3.310.0050.00316.39
7.3.300.0030.00316.47
7.3.290.0090.00516.33
7.3.280.0080.01116.36
7.3.270.0130.00317.40
7.3.260.0140.00316.63
7.3.250.0110.00716.33
7.3.240.0100.00916.36
7.3.230.0140.01116.60
7.3.210.0110.00516.44
7.3.200.0100.00716.57
7.3.190.0090.00916.52
7.3.180.0060.00916.51
7.3.170.0070.01016.41
7.3.160.0100.00716.51
7.3.130.0170.00014.74
7.3.120.0120.00614.65
7.3.110.0040.01114.77
7.3.100.0060.00615.00
7.3.90.0080.00814.61
7.3.80.0070.00314.84
7.3.70.0030.00914.76
7.3.60.0080.00614.73
7.3.50.0030.00914.96
7.3.40.0000.00814.88
7.3.30.0080.00714.83
7.3.20.0090.00616.56
7.3.10.0070.00916.55
7.3.00.0070.00716.52
7.2.330.0070.01016.55
7.2.320.0110.00716.79
7.2.310.0100.00616.45
7.2.300.0060.01016.61
7.2.290.0100.00716.70
7.2.260.0090.00914.80
7.2.250.0060.01215.18
7.2.240.0080.00615.21
7.2.230.0030.01014.99
7.2.220.0000.01214.77
7.2.210.0000.01114.92
7.2.200.0030.01014.85
7.2.190.0040.01115.04
7.2.180.0040.01114.94
7.2.170.0000.01414.69
7.2.160.0060.00315.04
7.2.150.0030.01216.86
7.2.140.0090.00616.82
7.2.130.0070.00716.82
7.2.120.0050.00916.68
7.2.110.0100.00616.81
7.2.100.0030.00616.74
7.2.90.0030.01216.83
7.2.80.0060.00616.94
7.2.70.0030.01016.72
7.2.60.0090.00616.95
7.2.50.0030.00916.78
7.2.40.0080.00616.91
7.2.30.0060.00816.95
7.2.20.0090.00816.95
7.2.10.0050.00716.83
7.2.00.0090.00516.70
7.1.330.0040.01115.84
7.1.320.0060.00615.67
7.1.310.0060.00915.68
7.1.300.0060.00815.80
7.1.290.0040.01115.75
7.1.280.0070.00415.77
7.1.270.0000.00815.38
7.1.260.0120.00315.91
7.1.250.0080.00615.70
7.1.240.0040.00815.66
7.1.230.0080.00815.52
7.1.220.0040.00415.55
7.1.210.0030.01015.45
7.1.200.0070.00715.69
7.1.190.0060.00615.81
7.1.180.0120.00315.57
7.1.170.0060.00915.63
7.1.160.0040.00415.53
7.1.150.0030.01315.57
7.1.140.0030.00715.40
7.1.130.0070.00715.75
7.1.120.0100.00315.53
7.1.110.0030.01015.79
7.1.100.0000.00815.83
7.1.90.0070.00715.55
7.1.80.0070.00715.43
7.1.70.0020.01016.51
7.1.60.0410.00724.48
7.1.50.0450.01524.28
7.1.40.0430.01023.87
7.1.30.0410.01124.07
7.1.20.0500.01024.14
7.1.10.0400.01015.18
7.1.00.0360.01015.25
7.0.330.0030.00915.42
7.0.320.0070.00715.37
7.0.310.0000.01115.35
7.0.300.0040.00415.30
7.0.290.0030.00815.25
7.0.280.0060.00615.30
7.0.270.0040.00815.45
7.0.260.0030.01015.32
7.0.250.0000.00915.09
7.0.240.0030.01015.46
7.0.230.0070.00315.46
7.0.220.0060.00615.38
7.0.210.0080.00615.34
7.0.200.0310.00815.11
7.0.190.0450.00815.10
7.0.180.0320.01314.84
7.0.170.0290.01214.82
7.0.160.0320.01314.83
7.0.150.0320.00714.83
7.0.140.0320.01114.80
7.0.130.0430.01214.89
7.0.120.0360.01114.95
7.0.110.0320.01314.91
7.0.100.0300.01215.04
7.0.90.0370.00814.99
7.0.80.0370.01115.00
7.0.70.0300.01114.95
7.0.60.0300.00814.76
7.0.50.0330.00615.07
7.0.40.0500.00714.10
7.0.30.0350.01014.10
7.0.20.0320.01214.08
7.0.10.0250.00713.99
7.0.00.0370.00514.05
5.6.400.0040.00714.50
5.6.390.0110.00314.34
5.6.380.0060.00314.25
5.6.370.0060.00614.29
5.6.360.0120.00014.54
5.6.350.0030.01314.61
5.6.340.0110.00714.43
5.6.330.0030.00714.33
5.6.320.0040.00414.58
5.6.310.0040.00414.32
5.6.300.0040.00814.33
5.6.290.0090.00014.23
5.6.280.0090.00314.27
5.6.270.0090.00914.49
5.6.260.0110.00414.32
5.6.250.0090.00414.27
5.6.240.0130.00014.50
5.6.230.0060.00914.48
5.6.220.0030.01314.30
5.6.210.0030.01014.36
5.6.200.0070.00714.52
5.6.190.0090.00314.51
5.6.180.0070.00714.29
5.6.170.0090.00614.14
5.6.160.0030.01014.27
5.6.150.0090.00614.65
5.6.140.0110.00314.29
5.6.130.0060.00314.46
5.6.120.0000.00914.36
5.6.110.0030.01014.28
5.6.100.0110.00414.26
5.6.90.0090.00314.19
5.6.80.0030.01214.37
5.6.70.0120.00314.00
5.6.60.0100.00314.04
5.6.50.0120.00313.98
5.6.40.0080.00314.11
5.6.30.0100.00314.09
5.6.20.0030.01014.02
5.6.10.0070.00714.25
5.6.00.0030.01314.27

preferences:
35.38 ms | 400 KiB | 5 Q