3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $fileHandles = []; public $files = []; public function baz() { $offset = 15; $this->files[$offset] = tempnam(); if (false === $file || false === $this->fileHandles[$offset] = fopen($this->files[$offset], 'rb')) { throw new RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); } } } $foo = new Foo; $foo->baz(); function set($param) { if ($param > 10) { return $param; } return false; }

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.0090.01216.63
8.3.50.0120.00821.14
8.3.40.0130.00318.71
8.3.30.0110.00418.85
8.3.20.0080.00020.16
8.3.10.0060.00323.53
8.3.00.0080.00019.56
8.2.180.0110.00418.29
8.2.170.0040.01122.96
8.2.160.0090.00620.39
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0040.01226.16
8.2.120.0050.00519.19
8.2.110.0000.01022.11
8.2.100.0080.00417.75
8.2.90.0060.00319.23
8.2.80.0030.00517.97
8.2.70.0000.00817.50
8.2.60.0040.00417.93
8.2.50.0030.00518.07
8.2.40.0060.00319.13
8.2.30.0040.00419.59
8.2.20.0000.00717.74
8.2.10.0050.00318.08
8.2.00.0000.00818.05
8.1.280.0070.00725.92
8.1.270.0040.00421.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.56
8.1.230.0000.01517.42
8.1.220.0030.00617.77
8.1.210.0090.00018.77
8.1.200.0030.00617.23
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0040.00422.01
8.1.150.0040.00418.77
8.1.140.0050.00317.34
8.1.130.0030.00617.59
8.1.120.0050.00217.39
8.1.110.0090.00017.29
8.1.100.0040.00417.40
8.1.90.0000.00717.30
8.1.80.0040.00417.36
8.1.70.0000.00717.49
8.1.60.0000.00917.61
8.1.50.0030.00517.45
8.1.40.0030.00517.44
8.1.30.0080.00417.67
8.1.20.0000.00817.61
8.1.10.0020.00517.50
8.1.00.0040.00417.42
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0070.00018.32
8.0.270.0040.00417.15
8.0.260.0030.00617.16
8.0.250.0050.00217.02
8.0.240.0000.00816.91
8.0.230.0030.00316.95
8.0.220.0030.00316.79
8.0.210.0000.00716.85
8.0.200.0060.00016.85
8.0.190.0030.00516.86
8.0.180.0070.00016.91
8.0.170.0000.00716.81
8.0.160.0000.00716.81
8.0.150.0000.00716.80
8.0.140.0070.00016.91
8.0.130.0000.00613.39
8.0.120.0000.00816.77
8.0.110.0000.00816.75
8.0.100.0000.00716.89
8.0.90.0000.00716.80
8.0.80.0060.01516.86
8.0.70.0030.00516.80
8.0.60.0000.00716.86
8.0.50.0070.00016.70
8.0.30.0110.00916.97
8.0.20.0130.00817.40
8.0.10.0000.00716.97
8.0.00.0120.00716.67
7.4.330.0020.00215.15
7.4.320.0000.00616.63
7.4.300.0030.00316.57
7.4.290.0070.00016.47
7.4.280.0040.00416.53
7.4.270.0030.00316.52
7.4.260.0080.00016.53
7.4.250.0070.00016.34
7.4.240.0020.00616.60
7.4.230.0040.00416.68
7.4.220.0060.01216.55
7.4.210.0100.00716.54
7.4.200.0030.00316.68
7.4.160.0040.01716.62
7.4.150.0060.01217.40
7.4.140.0130.01017.86
7.4.130.0070.01116.47
7.4.120.0130.00816.55
7.4.110.0120.00916.71
7.4.100.0030.01416.46
7.4.90.0150.00316.56
7.4.80.0090.00919.39
7.4.70.0070.01016.67
7.4.60.0090.00616.71
7.4.50.0080.00016.46
7.4.40.0030.01316.63
7.4.30.0130.01016.44
7.4.00.0100.00714.88
7.3.330.0000.00513.45
7.3.320.0020.00213.51
7.3.310.0040.00416.67
7.3.300.0070.00016.38
7.3.290.0000.00716.55
7.3.280.0120.00716.48
7.3.270.0120.00617.40
7.3.260.0140.00316.51
7.3.240.0100.01716.55
7.3.230.0110.00916.49
7.3.210.0100.01016.44
7.3.200.0030.01316.49
7.3.190.0000.01716.68
7.3.180.0040.01516.43
7.3.170.0090.00916.55
7.3.160.0140.00716.70
7.3.120.0090.00915.05
7.3.110.0070.01014.84
7.3.100.0040.01114.91
7.3.90.0040.00814.89
7.3.80.0030.01314.64
7.3.70.0030.01014.91
7.3.60.0070.00314.95
7.3.50.0090.00614.79
7.3.40.0070.00714.64
7.3.30.0040.00814.90
7.3.20.0060.00916.48
7.3.10.0030.01016.67
7.3.00.0060.00816.53
7.2.330.0060.01216.85
7.2.320.0100.01316.82
7.2.310.0140.00316.77
7.2.300.0080.00816.76
7.2.290.0170.00716.83
7.2.250.0100.00615.09
7.2.240.0070.01315.23
7.2.230.0120.00315.00
7.2.220.0060.00615.27
7.2.210.0060.01014.92
7.2.200.0090.00614.96
7.2.190.0030.01014.90
7.2.180.0060.00315.22
7.2.170.0110.00415.13
7.2.60.0030.01216.71
7.2.00.0000.01219.39
7.1.330.0040.01215.80
7.1.320.0070.00715.98
7.1.310.0030.01015.45
7.1.300.0090.00015.63
7.1.290.0040.00715.83
7.1.280.0060.00315.70
7.1.270.0120.00315.91
7.1.260.0090.00915.81
7.1.200.0100.00315.93
7.1.100.0040.00818.21
7.1.70.0000.00917.13
7.1.60.0000.02219.27
7.1.50.0080.00416.85
7.1.00.0030.07722.30
7.0.200.0050.00316.64
7.0.60.0070.06719.87
7.0.50.0100.05017.97
7.0.40.0130.07720.02
7.0.30.0500.04320.13
7.0.20.0200.04720.08
7.0.10.0070.08720.09
7.0.00.0130.07720.18
5.6.280.0000.03320.92
5.6.210.0070.08020.57
5.6.200.0100.05018.29
5.6.190.0130.08720.39
5.6.180.0230.07020.47
5.6.170.0230.08320.62
5.6.160.0130.06720.51
5.6.150.0100.05718.18
5.6.140.0070.04318.17
5.6.130.0070.07718.28
5.6.120.0100.07021.06
5.6.110.0030.08720.90
5.6.100.0030.07021.02
5.6.90.0070.05721.02
5.6.80.0070.08020.43
5.6.70.4070.04320.38
5.5.350.0170.08320.33
5.5.340.0130.06017.93
5.5.330.0130.07720.46
5.5.320.0470.06020.26
5.5.310.0370.06720.26
5.5.300.0070.07717.95
5.5.290.0130.07018.05
5.5.280.0170.07320.90
5.5.270.0030.04320.84
5.5.260.0100.08020.87
5.5.250.0200.06320.50
5.5.240.0270.07320.27
5.4.450.0870.06319.23
5.4.440.0870.06319.27
5.4.430.1000.05319.42
5.4.420.0900.05319.55
5.4.410.0800.06318.98
5.4.400.0800.06319.11
5.4.390.0830.04719.21
5.4.380.0700.06019.12
5.4.370.0770.05719.13
5.4.360.0730.07719.22
5.4.350.0600.06019.28
5.4.340.0570.07019.23
5.4.320.0900.06319.23
5.4.310.0800.05319.13
5.4.300.0630.06019.10
5.4.290.0770.05719.22
5.4.280.0700.05719.09
5.4.270.0730.05019.10
5.4.260.0700.06319.16
5.4.250.0870.04718.94
5.4.240.0770.07019.07
5.4.230.1000.05318.89
5.4.220.0670.06318.75
5.4.210.0700.07019.23
5.4.200.0900.05318.79
5.4.190.0700.05319.22
5.4.180.0670.06318.99
5.4.170.0900.07719.22
5.4.160.0830.05319.07
5.4.150.0670.07719.05
5.4.140.0870.05716.39
5.4.130.0770.04716.54
5.4.120.0700.05716.43
5.4.110.0830.05016.66
5.4.100.0630.05016.50
5.4.90.0700.05316.57
5.4.80.0830.05716.61
5.4.70.0270.05016.49
5.4.60.0170.03716.27
5.4.50.0070.07016.32
5.4.40.0000.07316.43
5.4.30.0100.06716.24
5.4.20.0230.03016.42

preferences:
53.02 ms | 401 KiB | 5 Q