3v4l.org

run code in 300+ PHP versions simultaneously
<?php class TestCase { private $num; private function yesOrNo() { return false; } public function runBare() { // simulating https://github.com/sebastianbergmann/phpunit/blob/9.1.5/src/Framework/TestCase.php#L1035 $this->doThePostConditionHook(); printf('We did %d tests', $this->num); } } trait ImmaExtendThis { /** * @postCondition */ protected function doThePostConditionHook() { echo '' . PHP_EOL; $this->num++; } private function brutalNumWorkaround() { (new ReflectionProperty(TestCase::class, 'num'))->setAccessible(true); } } class MyTest extends TestCase { use ImmaExtendThis; // ... } $my = new MyTest(); $my->runBare();

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.5.10.0080.01016.86
8.5.00.0150.00620.15
8.4.150.0030.00014.05
8.4.140.0080.01117.76
8.4.130.0140.00617.90
8.4.120.0100.01022.21
8.4.110.0090.00822.24
8.4.100.0140.00717.68
8.4.90.0110.01017.71
8.4.80.0110.00817.93
8.4.70.0080.01217.92
8.4.60.0030.00617.96
8.4.50.0140.00617.79
8.4.40.0100.00717.79
8.4.30.0060.00320.24
8.4.20.0150.00622.17
8.4.10.0030.00522.70
8.3.280.0140.00718.58
8.3.270.0080.00816.58
8.3.260.0120.00416.75
8.3.250.0060.00619.09
8.3.240.0110.00616.72
8.3.230.0100.00916.77
8.3.220.0110.00717.12
8.3.210.0090.00616.69
8.3.200.0040.00316.64
8.3.190.0120.00618.55
8.3.180.0110.00716.54
8.3.170.0140.00416.84
8.3.160.0160.00616.93
8.3.150.0180.00017.16
8.3.140.0060.01017.20
8.3.130.0080.00018.59
8.3.120.0060.01318.89
8.3.110.0030.00618.65
8.3.100.0080.00016.69
8.3.90.0110.00718.73
8.3.80.0090.00019.36
8.3.70.0170.00016.63
8.3.60.0090.00618.43
8.3.50.0100.00724.43
8.3.40.0110.00418.79
8.3.30.0000.01418.66
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.290.0060.00320.46
8.2.280.0070.00218.42
8.2.270.0160.00316.59
8.2.260.0050.00318.97
8.2.250.0060.00318.27
8.2.240.0120.00319.04
8.2.230.0090.00020.94
8.2.220.0060.01224.06
8.2.210.0030.00526.77
8.2.200.0030.00616.63
8.2.190.0110.00416.75
8.2.180.0040.01825.92
8.2.170.0030.01018.91
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0140.00026.35
8.2.110.0100.00021.06
8.2.100.0080.00417.84
8.2.90.0050.00319.30
8.2.80.0080.00017.97
8.2.70.0050.00317.63
8.2.60.0040.00418.05
8.2.50.0040.00418.05
8.2.40.0050.00318.28
8.2.30.0000.00718.11
8.2.20.0040.00418.17
8.2.10.0000.00719.38
8.2.00.0040.00419.25
8.1.330.0120.00716.63
8.1.320.0080.01116.08
8.1.310.0210.00017.00
8.1.300.0050.00519.57
8.1.290.0060.00318.88
8.1.280.0080.00825.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0070.00321.35
8.1.230.0040.00817.83
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00417.13
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0000.00818.70
8.1.160.0000.00718.81
8.1.150.0040.00418.95
8.1.140.0050.00318.78
8.1.130.0000.00720.20
8.1.120.0050.00317.54
8.1.110.0080.00017.36
8.1.100.0000.00717.45
8.1.90.0030.00517.52
8.1.80.0040.00717.47
8.1.70.0030.00317.36
8.1.60.0030.00617.59
8.1.50.0000.00917.49
8.1.40.0060.00617.41
8.1.30.0030.00617.63
8.1.20.0040.00717.70
8.1.10.0000.00817.61
8.1.00.0040.00417.52
8.0.300.0060.00318.84
8.0.290.0030.00616.75
8.0.280.0030.00320.12
8.0.270.0040.00418.08
8.0.260.0060.00018.35
8.0.250.0040.00417.01
8.0.240.0040.00417.04
8.0.230.0070.00017.05
8.0.220.0030.00316.91
8.0.210.0030.00316.96
8.0.200.0030.00317.02
8.0.190.0050.00317.05
8.0.180.0040.00416.98
8.0.170.0000.00916.90
8.0.160.0050.00216.97
8.0.150.0030.00516.98
8.0.140.0070.00016.95
8.0.130.0000.00613.44
8.0.120.0000.00716.92
8.0.110.0040.00416.97
8.0.100.0000.00716.84
8.0.90.0000.00716.80
8.0.80.0030.01016.96
8.0.70.0050.00317.01
8.0.60.0040.00416.95
8.0.50.0060.00316.92
8.0.30.0110.00717.14
8.0.20.0080.01216.94
8.0.10.0040.00417.06
8.0.00.0110.00716.75
7.4.330.0070.00016.79
7.4.320.0030.00316.45
7.4.300.0030.00616.44
7.4.290.0030.00316.57
7.4.280.0000.01016.57
7.4.270.0030.00316.42
7.4.260.0000.00513.32
7.4.250.0040.00416.48
7.4.240.0020.00516.46
7.4.230.0000.00716.72
7.4.220.0030.00316.49
7.4.210.0060.00916.57
7.4.200.0030.00316.40
7.4.130.0120.00616.56
7.4.120.0090.00916.70
7.4.110.0060.01016.59
7.4.100.0070.01016.42
7.4.90.0110.01116.45
7.4.80.0110.01416.24
7.4.70.0130.01116.54
7.4.60.0150.01116.54
7.4.50.0080.01716.09
7.4.40.0040.01816.38
7.4.30.0060.01916.16
7.4.20.0090.01416.07
7.4.10.0160.00916.29
7.4.00.0100.01216.37
7.3.330.0000.00716.40
7.3.320.0030.00313.21
7.3.310.0040.00416.33
7.3.300.0070.00016.43
7.3.290.0080.00816.34
7.3.280.0070.00716.33
7.3.260.0120.00616.50
7.3.230.0120.00616.63
7.3.210.0110.00916.35
7.3.200.0100.01316.22
7.3.190.0090.01716.30
7.3.180.0020.02116.27
7.3.170.0170.00716.32
7.3.160.0090.01516.36
7.3.150.0130.01016.00
7.3.140.0120.00916.39
7.3.130.0110.01416.15
7.3.120.0150.00916.55
7.3.110.0140.01216.19
7.3.100.0130.01016.27
7.3.90.0110.01416.02
7.3.80.0150.00916.03
7.3.70.0000.02216.09
7.3.60.0130.01016.22
7.3.50.0190.00616.40
7.3.40.0130.01016.22
7.3.30.0140.00916.28
7.3.20.0140.01216.46
7.3.10.0190.00316.20
7.3.00.0250.00016.35
7.2.330.0130.01116.48
7.2.320.0140.01116.35
7.2.310.0040.02116.48
7.2.300.0080.01416.66
7.2.290.0110.01716.63
7.2.280.0150.00616.67
7.2.270.0100.01416.71
7.2.260.0130.01116.33
7.2.250.0130.00916.45
7.2.240.0150.00916.69
7.2.230.0170.00316.66
7.2.220.0170.00816.45
7.2.210.0150.01216.73
7.2.200.0030.02216.31
7.2.190.0120.01216.46
7.2.180.0120.01316.54
7.2.170.0120.01016.67
7.2.160.0180.00716.70
7.2.150.0060.01816.80
7.2.140.0070.01716.67
7.2.130.0120.00916.57
7.2.120.0360.01016.65
7.2.110.0150.00916.51
7.2.100.0120.01216.79
7.2.90.0150.00916.46
7.2.80.0150.01316.46
7.2.70.0080.01916.59
7.2.60.0120.01216.51
7.2.50.0090.01416.68
7.2.40.0080.01516.84
7.2.30.0090.01616.64
7.2.20.0130.01416.71
7.2.10.0080.01716.36
7.2.00.0130.01316.59

preferences:
40.94 ms | 403 KiB | 5 Q