3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Generics; class CollectionᐸTᐳ implements \Countable { private $items = []; public function add(T $item) { $this->items[] = $item; } public function count() { return count($this->items); } } // Super-secret generics library: exec(base64_decode('CmNsYXNzIFQgZXh0ZW5kcyBcRGF0ZVRpbWUge30KY2xhc3MgRGF0ZVRpbWUgZXh0ZW5kcyBUIHt9OwpjbGFzcyBDb2xsZWN0aW9u4ZC4RGF0ZVRpbWXhkLMgZXh0ZW5kcyBDb2xsZWN0aW9u4ZC4VOGQsyB7fQ==')); $dates = new CollectionᐸDateTimeᐳ(); $dates->add(new DateTime('yesterday')); $dates->add(new DateTime('today')); $dates->add(new DateTime('tomorrow')); echo count($dates);

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.0170.00416.88
8.3.50.0090.00616.30
8.3.40.0150.00318.79
8.3.30.0090.00618.79
8.3.20.0040.00420.16
8.3.10.0040.00423.48
8.3.00.0040.00417.72
8.2.180.0110.00416.63
8.2.170.0060.01022.96
8.2.160.0000.01520.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0050.00321.13
8.2.120.0080.00026.35
8.2.110.0100.00019.33
8.2.100.0060.00617.82
8.2.90.0040.00419.21
8.2.80.0030.00617.97
8.2.70.0030.00717.75
8.2.60.0000.00918.04
8.2.50.0090.00018.10
8.2.40.0060.00322.27
8.2.30.0040.00421.07
8.2.20.0030.00618.03
8.2.10.0040.00418.15
8.2.00.0060.00318.09
8.1.280.0100.01025.92
8.1.270.0050.00323.94
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00022.45
8.1.230.0090.00320.74
8.1.220.0040.00417.77
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0050.00518.57
8.1.160.0060.00319.08
8.1.150.0070.00018.80
8.1.140.0070.00019.72
8.1.130.0020.00517.52
8.1.120.0060.00317.46
8.1.110.0000.00917.50
8.1.100.0070.00417.41
8.1.90.0000.00717.37
8.1.80.0000.00717.55
8.1.70.0080.00017.56
8.1.60.0000.00817.58
8.1.50.0070.00017.42
8.1.40.0030.00617.52
8.1.30.0040.00417.60
8.1.20.0050.00317.63
8.1.10.0030.00517.59
8.1.00.0040.00417.36
8.0.300.0000.00819.76
8.0.290.0050.00316.88
8.0.280.0000.00818.57
8.0.270.0070.00417.21
8.0.260.0050.00316.88
8.0.250.0080.00017.10
8.0.240.0040.00416.93
8.0.230.0000.01016.98
8.0.220.0000.00716.88
8.0.210.0070.00016.96
8.0.200.0000.00716.90
8.0.190.0040.00416.93
8.0.180.0050.00316.88
8.0.170.0030.00416.93
8.0.160.0060.00316.88
8.0.150.0050.00216.94
8.0.140.0040.00416.84
8.0.130.0050.00013.37
8.0.120.0080.00016.83
8.0.110.0080.00016.75
8.0.100.0080.00016.83
8.0.90.0040.00416.93
8.0.80.0070.00816.96
8.0.70.0020.00516.98
8.0.60.0000.00817.04
8.0.50.0000.00816.88
8.0.30.0120.00617.02
8.0.20.0100.01117.40
8.0.10.0000.00816.86
8.0.00.0080.00916.62
7.4.330.0060.00015.55
7.4.320.0060.00016.52
7.4.300.0000.00616.45
7.4.290.0050.00316.53
7.4.280.0000.00816.36
7.4.270.0070.00016.52
7.4.260.0070.00016.34
7.4.250.0060.00316.35
7.4.240.0000.00716.56
7.4.230.0050.00316.48
7.4.220.0160.01116.51
7.4.210.0120.00416.57
7.4.200.0080.00016.44
7.4.160.0100.00916.56
7.4.150.0090.00917.40
7.4.140.0090.01617.86
7.4.130.0050.01716.43
7.4.120.0100.00916.46
7.4.110.0090.00916.73
7.4.100.0100.01016.68
7.4.90.0070.01116.73
7.4.80.0100.01419.39
7.4.70.0150.00616.43
7.4.60.0110.00616.43
7.4.50.0120.00616.61
7.4.40.0130.00316.61
7.4.30.0080.00916.75
7.4.00.0140.00414.83
7.3.330.0060.00013.14
7.3.320.0000.00513.19
7.3.310.0070.00016.31
7.3.300.0040.00416.30
7.3.290.0110.00616.32
7.3.280.0090.00916.31
7.3.270.0150.00517.40
7.3.260.0180.00016.50
7.3.250.0120.00616.50
7.3.240.0120.00616.47
7.3.230.0120.01016.57
7.3.210.0110.01116.31
7.3.200.0030.01316.64
7.3.190.0130.00316.37
7.3.180.0120.00816.54
7.3.170.0100.00716.58
7.3.160.0130.01016.43
7.3.120.0120.00614.64
7.3.110.0110.00414.99
7.3.100.0000.01515.02
7.3.90.0060.00715.06
7.3.80.0110.00714.88
7.3.70.0070.00714.66
7.3.60.0030.01414.88
7.3.50.0050.01014.87
7.3.40.0000.01314.76
7.3.30.0040.01514.91
7.3.20.0030.00716.53
7.3.10.0120.00416.65
7.3.00.0040.01116.43
7.2.330.0090.01916.67
7.2.320.0060.01216.32
7.2.310.0100.00716.61
7.2.300.0150.00416.53
7.2.290.0060.01016.49
7.2.240.0070.00814.89
7.2.230.0110.00414.96
7.2.220.0050.01014.97
7.2.210.0060.00614.80
7.2.200.0060.01214.68
7.2.190.0100.00414.58
7.2.180.0000.01614.57
7.2.170.0030.01315.04
7.2.160.0050.00615.19
7.2.150.0070.00716.79
7.2.140.0070.00716.70
7.2.130.0040.01117.02
7.2.120.0090.00916.92
7.2.110.0120.01116.83
7.2.100.0090.00416.96
7.2.90.0070.01116.96
7.2.80.0100.00816.71
7.2.70.0130.00416.75
7.2.60.0080.00916.93
7.2.50.0120.00616.85
7.2.40.0070.00717.18
7.2.30.0120.00616.92
7.2.20.0080.01216.91
7.2.10.0060.01216.96
7.2.00.0090.01018.03
7.1.330.0120.00415.77
7.1.320.0040.00815.70
7.1.310.0030.01315.50
7.1.300.0070.01015.68
7.1.290.0030.01615.59
7.1.280.0040.01215.92
7.1.270.0060.00915.79
7.1.260.0030.01315.68
7.1.250.0070.00415.63
7.1.200.0090.00015.58
7.1.100.0000.01318.18
7.1.70.0040.01417.00
7.1.60.0240.01734.94
7.1.50.0210.01934.60
7.1.40.0240.02134.43
7.1.30.0240.02234.75
7.1.20.0180.01934.56
7.1.10.0120.01216.56
7.1.00.0150.00316.76
7.0.200.0140.00816.77
7.0.190.0050.01516.68
7.0.180.0070.01716.17
7.0.170.0070.01416.24
7.0.160.0120.01016.29
7.0.150.0100.01016.24
7.0.140.0080.01216.29
7.0.130.0050.01416.43
7.0.120.0080.00616.46
7.0.110.0060.01216.25
7.0.100.0130.00616.32
7.0.90.0070.01116.22
7.0.80.0040.01116.11
7.0.70.0030.01316.31
7.0.60.0090.01015.90
7.0.50.0030.01516.32
7.0.40.0060.01316.45
7.0.30.0030.01516.34
7.0.20.0090.00616.14
7.0.10.0140.00416.44
7.0.00.0060.01216.13

preferences:
53.46 ms | 401 KiB | 5 Q